From: Guido van Rossum Date: Thu, 8 Aug 1996 19:10:21 +0000 (+0000) Subject: Hack for Mac (where fabs is not usable as a function pointer). X-Git-Tag: v1.4b3~183 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6412b1de5dd28c2aa85ba1bccb187049abc170ea;p=python Hack for Mac (where fabs is not usable as a function pointer). --- diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 242bd6f977..e69aea9f4a 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -145,7 +145,12 @@ FUNC1(math_ceil, ceil) FUNC1(math_cos, cos) FUNC1(math_cosh, cosh) FUNC1(math_exp, exp) +#ifdef __MWERKS__ +double myfabs(double x) { return fabs(x); } +FUNC1(math_fabs, myfabs) +#else FUNC1(math_fabs, fabs) +#endif FUNC1(math_floor, floor) FUNC2(math_fmod, fmod) FUNC2(math_hypot, hypot)