[php] Fix reserved class names TRUE, FALSE, NULL
PHPCN(x) does a string compare of x with the lower-cased class name, so x needs to be in lowercase or else the entry has no effect. The entries for TRUE, FALSE and NULL weren't working as a result.
This commit is contained in:
parent
853c511057
commit
b671a37e89
2 changed files with 19 additions and 4 deletions
|
|
@ -5,6 +5,9 @@
|
||||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) stdClass;
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) stdClass;
|
||||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) directory;
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) directory;
|
||||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) Hello::empty();
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) Hello::empty();
|
||||||
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) null;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) True;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_KEYWORD) FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%ignore prev::operator++;
|
%ignore prev::operator++;
|
||||||
|
|
@ -36,4 +39,15 @@
|
||||||
prev operator++(int) { return *this; }
|
prev operator++(int) { return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class null
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
class True
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
class FALSE
|
||||||
|
{
|
||||||
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -623,7 +623,8 @@ PHPBN2(PGSQL_POLLING_OK);
|
||||||
PHPBN2(PGSQL_POLLING_READING);
|
PHPBN2(PGSQL_POLLING_READING);
|
||||||
PHPBN2(PGSQL_POLLING_WRITING);
|
PHPBN2(PGSQL_POLLING_WRITING);
|
||||||
|
|
||||||
/* Class names reserved by PHP (case insensitive) */
|
/* Class names reserved by PHP. */
|
||||||
|
/* Check is case insensitive - these *MUST* be listed in lower case here. */
|
||||||
PHPCN(directory);
|
PHPCN(directory);
|
||||||
PHPCN(stdclass);
|
PHPCN(stdclass);
|
||||||
PHPCN(__php_incomplete_class);
|
PHPCN(__php_incomplete_class);
|
||||||
|
|
@ -639,9 +640,9 @@ PHPCN(bool); // As of PHP 7.0
|
||||||
PHPCN(int); // As of PHP 7.0
|
PHPCN(int); // As of PHP 7.0
|
||||||
PHPCN(float); // As of PHP 7.0
|
PHPCN(float); // As of PHP 7.0
|
||||||
PHPCN(string); // As of PHP 7.0
|
PHPCN(string); // As of PHP 7.0
|
||||||
PHPCN(NULL); // As of PHP 7.0
|
PHPCN(null); // As of PHP 7.0
|
||||||
PHPCN(TRUE); // As of PHP 7.0
|
PHPCN(true); // As of PHP 7.0
|
||||||
PHPCN(FALSE); // As of PHP 7.0
|
PHPCN(false); // As of PHP 7.0
|
||||||
PHPCN(resource); // As of PHP 7.0 (currently works but reserved)
|
PHPCN(resource); // As of PHP 7.0 (currently works but reserved)
|
||||||
PHPCN(object); // As of PHP 7.0 (currently works but reserved)
|
PHPCN(object); // As of PHP 7.0 (currently works but reserved)
|
||||||
PHPCN(mixed); // As of PHP 7.0 (currently works but reserved)
|
PHPCN(mixed); // As of PHP 7.0 (currently works but reserved)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue