Conditionalise math.i for PHP
PHP already provides all the wrapped constants and all the wrapped functions except fabs() (PHP provides abs() instead). Rewrapping the constants causes warnings or errors (depending on PHP version) and the rewrapped functions seem to be hidden by the built-in versions, so only wrap fabs() for PHP. (Even a wrapper for fabs() seems of little use since abs() is already provided, but really math.i seems of little use more generally since any general purpose programming language will provide its own maths functions and constants - the key motivation here is to eliminate warnings and errors from running the testsuite.)
This commit is contained in:
parent
6afc3e3504
commit
4e0997cd5a
2 changed files with 10 additions and 8 deletions
|
|
@ -1,7 +1,2 @@
|
|||
%module li_math
|
||||
#ifdef SWIGPHP
|
||||
// PHP already provides these functions with the same names, so just kill that
|
||||
// warning.
|
||||
%warnfilter(SWIGWARN_PARSE_KEYWORD);
|
||||
#endif
|
||||
%include math.i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue