Re: Default argument for C++ shared_ptr in Python
Michael Riesch <[email protected]>
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <[email protected]> |
Hello William,
> This is a bug due to a change in optional argument handling where they
> are by default obtained from Python rather than C++ code.
> Unfortunately this won't be so easy to fix. Can you please raise a bug
> on Github? The workaround is documented at
> http://www.swig.org/Doc4.0/Python.html#Python_default_args to restore
> obtaining the default argument from C++ code. You would add this
> before SWIG parses my_func:
>
> %feature("python:cdefaultargs") my_func;
thank you very much for your prompt response. I tested this workaround
for my actual project and it seems to work pretty well.
Sorry for the delayed response. Also, I haven't had time yet to open an
issue. I'll do that soon with the updated minimal working example.
Best regards,
Michael
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user