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:
William S Fulton 2015-01-08 23:33:47 +00:00
commit 38ba81811e
8 changed files with 139 additions and 69 deletions

View file

@ -14,7 +14,9 @@
#include <string>
// All kinds of numbers: hex, octal (which pose special problems to Python), negative...
void lots_of_args(int pos = -1, unsigned rgb = 0xabcdef, int mode = 0644) { }
void trickyvalue1(int first, int pos = -1) {}
void trickyvalue2(int first, unsigned rgb = 0xabcdef) {}
void trickyvalue3(int first, int mode = 0644) {}
// Long long arguments are not handled at Python level currently but still work.
void seek(long long offset = 0LL) {}