- Uniform the definition of the keyword warnings through
the supported languages. - Added keyword list for most of the languages that didn't have one. - "All keywords" warning support, through the -DSWIG_ALLKW option. Read the Changes.current git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b9fa8132dd
commit
ea0f636eae
18 changed files with 593 additions and 60 deletions
|
|
@ -742,38 +742,8 @@ DIRECTOROUT_TYPEMAP(std::size_t, PyInt_AsLong);
|
|||
|
||||
#endif
|
||||
|
||||
/* Warnings for certain Python keywords */
|
||||
#define PYKW(x) %namewarn("314:" #x " is a python keyword") #x
|
||||
|
||||
PYKW(and);
|
||||
PYKW(assert);
|
||||
PYKW(break);
|
||||
PYKW(class);
|
||||
PYKW(continue);
|
||||
PYKW(def);
|
||||
PYKW(del);
|
||||
PYKW(elif);
|
||||
PYKW(else);
|
||||
PYKW(except);
|
||||
PYKW(exec);
|
||||
PYKW(finally);
|
||||
PYKW(for);
|
||||
PYKW(from);
|
||||
PYKW(global);
|
||||
PYKW(if);
|
||||
PYKW(import);
|
||||
PYKW(in);
|
||||
PYKW(is);
|
||||
PYKW(lambda);
|
||||
PYKW(not);
|
||||
PYKW(or);
|
||||
PYKW(pass);
|
||||
PYKW(print);
|
||||
PYKW(raise);
|
||||
PYKW(return);
|
||||
PYKW(try);
|
||||
PYKW(while);
|
||||
|
||||
/* Warnings for Python keywords */
|
||||
%include "pythonkw.swg"
|
||||
|
||||
/* The start of the Python initialization function */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue