fix for 'staticmethod' kw name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6911 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1bcd974a4e
commit
bef269c021
3 changed files with 6 additions and 1 deletions
|
|
@ -152,6 +152,10 @@ struct Except {
|
|||
%}
|
||||
|
||||
// Default parameters in static class methods
|
||||
#ifdef SWIGPYTHON
|
||||
%rename(staticMethod) staticmethod;
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
namespace SpaceName {
|
||||
struct Statics {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import default_args
|
||||
|
||||
|
||||
if default_args.Statics.staticmethod() != 60:
|
||||
if default_args.Statics.staticMethod() != 60:
|
||||
raise RuntimeError
|
||||
|
||||
if default_args.cfunc1(1) != 2:
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ PYTHONKW(return);
|
|||
PYTHONKW(try);
|
||||
PYTHONKW(while);
|
||||
PYTHONKW(yield);
|
||||
PYTHONKW(staticmethod);
|
||||
|
||||
/*
|
||||
built-in functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue