Fix Python default argument handing broken since swig-3.0.3
Default values are no longer generated as Python code by default. They must be explicitly turned on using the "python:defaultargs" feature. Closes #294 Closes #296 The problems in these two issues when "python:defaultargs" is turned on still need to be fixed and should be addressed in separate patches. The important thing is the default code generation is now fixed.
This commit is contained in:
parent
34787ab98e
commit
38ba81811e
8 changed files with 139 additions and 69 deletions
|
|
@ -185,6 +185,16 @@ These methods "may be called" if needed.
|
|||
#define %clearpythonappend %feature("pythonappend","")
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/*
|
||||
Python default argument handling (for non-builtin)
|
||||
*/
|
||||
|
||||
#define %pythondefaultargs %feature("python:defaultargs")
|
||||
#define %nopythondefaultargs %feature("python:defaultargs", "0")
|
||||
#define %clearpythondefaultargs %feature("python:defaultargs", "")
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue