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