From 54f44d4dcf22c65bf805c781c5d111bcea9fd4af Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 4 Aug 2009 11:59:39 +0200 Subject: [PATCH] PHP: fix for the li_math testcase --- CHANGES.current | 5 +++++ Lib/php/phpkw.swg | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index e44417f..4709c23 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,11 @@ Version 1.3.40 (in progress) ============================ +2009-08-04: vmiklos + [PHP] Various mathematical functions (which would conflict + with the built-in PHP ones) are now automatically handled by + adding a 'c_' prefix. + 2009-08-03: wsfulton [C#] The std::vector implementation is improved and now uses $typemap such that the proxy class for T no longer has to be specified in some macros diff --git a/Lib/php/phpkw.swg b/Lib/php/phpkw.swg index 301597e..e38f5e6 100644 --- a/Lib/php/phpkw.swg +++ b/Lib/php/phpkw.swg @@ -11,6 +11,7 @@ #define PHPBN1(x) %builtinwarn("'" `x` "' conflicts with a built-in name in PHP",sourcefmt="%(lower)s") `x` #define PHPBN2(x) %builtinwarn("'" `x` "' conflicts with a built-in name in PHP") "::" `x` +#define PHPFN(x) %keywordwarn("'" `x` "' is a PHP built-in function, renamed as 'c_" `x` "'",sourcefmt="%(lower)s",%$isfunction,%$not %$ismember,rename="c_%s") `x` /* @@ -455,7 +456,28 @@ PHPCN(SQLiteResult); PHPCN(SQLiteUnbuffered); PHPCN(SQLiteException); +/* Built-in PHP functions (incomplete). */ +PHPFN(cos); +PHPFN(sin); +PHPFN(tan); +PHPFN(acos); +PHPFN(asin); +PHPFN(atan); +PHPFN(atan2); +PHPFN(cosh); +PHPFN(sinh); +PHPFN(tanh); +PHPFN(exp); +PHPFN(log); +PHPFN(log10); +PHPFN(pow); +PHPFN(sqrt); +PHPFN(ceil); +PHPFN(floor); +PHPFN(fmod); + #undef PHPKW #undef PHPBN1 #undef PHPBN2 #undef PHPCN +#undef PHPFN -- 1.6.3.3