better kw from Olly's comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8151 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b034e6c266
commit
f3262ed3d9
3 changed files with 49 additions and 49 deletions
|
|
@ -1,20 +1,22 @@
|
|||
#ifndef __php_phpkw_swg__
|
||||
#define __php_phpkw_swg__
|
||||
//
|
||||
// The 'keywords' in PHP are global, ie, the following names are fine
|
||||
// when used as class methods.
|
||||
//
|
||||
|
||||
/* Warnings for Php keywords */
|
||||
#define PHPKW(x) %namewarn("314:" `x` " is a php keyword") `x`
|
||||
#define PHPKW(x) %namewarn("314:" `x` " is a php keyword",rename="_%s") "::" `x`
|
||||
#define PHPBN(x) %namewarn("321:" `x` " conflicts with a built-in name in php") "::" `x`
|
||||
|
||||
/*
|
||||
from
|
||||
http://aspn.activestate.com/ASPN/docs/PHP/reserved.html
|
||||
From
|
||||
|
||||
http://aspn.activestate.com/ASPN/docs/PHP/reserved.html
|
||||
|
||||
and reviewed by Olly Betts.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* we catalog these as kw since PHP will not run if used globally */
|
||||
PHPKW(and);
|
||||
PHPKW($argc);
|
||||
PHPKW($argv);
|
||||
PHPKW(as);
|
||||
PHPKW(break);
|
||||
PHPKW(case);
|
||||
|
|
@ -25,69 +27,53 @@ PHPKW(declare);
|
|||
PHPKW(default);
|
||||
PHPKW(die);
|
||||
PHPKW(do);
|
||||
PHPKW(E_ALL);
|
||||
PHPKW(echo);
|
||||
PHPKW(E_ERROR);
|
||||
PHPKW(else);
|
||||
PHPKW(elseif);
|
||||
PHPKW(empty);
|
||||
PHPKW(enddeclare);
|
||||
PHPKW(endfor);
|
||||
PHPKW(endforeach);
|
||||
PHPKW(endif);
|
||||
PHPKW(endswitch);
|
||||
PHPKW(endwhile);
|
||||
PHPKW(E_PARSE);
|
||||
PHPKW(eval);
|
||||
PHPKW(E_WARNING);
|
||||
PHPKW(exit);
|
||||
PHPKW(extends);
|
||||
PHPKW(FALSE);
|
||||
PHPKW(__FILE__);
|
||||
PHPKW(for);
|
||||
PHPKW(foreach);
|
||||
PHPKW(function);
|
||||
PHPKW(global);
|
||||
PHPKW($HTTP_COOKIE_VARS);
|
||||
PHPKW($HTTP_ENV_VARS);
|
||||
PHPKW($HTTP_GET_VARS);
|
||||
PHPKW($HTTP_POST_FILES);
|
||||
PHPKW($HTTP_POST_VARS);
|
||||
PHPKW($HTTP_SERVER_VARS);
|
||||
PHPKW(if);
|
||||
PHPKW(include);
|
||||
PHPKW(include_once);
|
||||
PHPKW(__LINE__);
|
||||
PHPKW(list);
|
||||
PHPKW(new);
|
||||
PHPKW(not);
|
||||
PHPKW(NULL);
|
||||
PHPKW(old_function);
|
||||
PHPKW(or);
|
||||
PHPKW(parent);
|
||||
PHPKW(PHP_OS);
|
||||
PHPKW($PHP_SELF);
|
||||
PHPKW(PHP_VERSION);
|
||||
PHPKW(print);
|
||||
PHPKW(require);
|
||||
PHPKW(require_once);
|
||||
PHPKW(return);
|
||||
PHPKW(__sleep);
|
||||
PHPKW(static);
|
||||
PHPKW(stdClass);
|
||||
PHPKW(switch);
|
||||
PHPKW($this);
|
||||
PHPKW(TRUE);
|
||||
PHPKW(var);
|
||||
PHPKW(virtual);
|
||||
PHPKW(__wakeup);
|
||||
PHPKW(while);
|
||||
PHPKW(xor);
|
||||
|
||||
|
||||
// These are bad names only if global.
|
||||
PHPBN(empty);
|
||||
PHPBN(print);
|
||||
|
||||
/* we catalog these as built-in names since they conflicts, but PHP still runs */
|
||||
PHPBN(E_ALL);
|
||||
PHPBN(E_ERROR);
|
||||
PHPBN(E_PARSE);
|
||||
PHPBN(E_WARNING);
|
||||
PHPBN(FALSE);
|
||||
PHPBN(PHP_OS);
|
||||
PHPBN(PHP_VERSION);
|
||||
PHPBN(TRUE);
|
||||
PHPBN(__sleep);
|
||||
PHPBN(__wakeup);
|
||||
|
||||
#undef PHPKW
|
||||
#undef PHPBN
|
||||
|
||||
|
||||
#endif //__php_phpkw_swg__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue