Use __FUNCTION__, which works on gcc and MSVC 7/8, instead of
__func__, which while standardized works only with gcc. I'll wait for bug reports from VC6 before bothering with fallback code...
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
#define NEWCSTR(c, s) NEWSTR(c, s, strlen(s))
|
||||
|
||||
// Generic argument error, assumes that the symbol "c" is a naContext,
|
||||
// and that the __func__ string is of the form "f_NASALSYMBOL".
|
||||
// and that the __FUNCTION__ string is of the form "f_NASALSYMBOL".
|
||||
#define ARGERR() \
|
||||
naRuntimeError(c, "bad/missing argument to %s()", (__func__ + 2))
|
||||
naRuntimeError(c, "bad/missing argument to %s()", (__FUNCTION__ + 2))
|
||||
|
||||
static naRef f_size(naContext c, naRef me, int argc, naRef* args)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
// Toss a runtime error for any NaN or Inf values produced. Note that
|
||||
// this assumes an IEEE 754 format.
|
||||
#define VALIDATE(r) (valid(r.num) ? (r) : die(c, __func__+2))
|
||||
#define VALIDATE(r) (valid(r.num) ? (r) : die(c, __FUNCTION__+2))
|
||||
|
||||
static int valid(double d)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user