modpython: Enable default arguments feature of SWIG 3.0.4

Some corner cases are disabled for now, until SWIG fixes them.
See #809 for details.
This commit is contained in:
Alexey Sokolov
2015-01-09 08:24:24 +00:00
parent 8fe8c69a88
commit 7504cb205b

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
%module znc_core %{
%module znc_core
%{
#include <utility>
#include "../include/znc/Utils.h"
#include "../include/znc/Threads.h"
@@ -51,6 +53,14 @@ using std::allocator;
%apply long { uint32_t };
%apply long { uint64_t };
// Just makes generated python code slightly more beautiful.
%feature("python:defaultargs");
// Probably can be removed when swig is fixed to not produce bad code for some cases
%feature("python:defaultargs", "0") CDir::MakeDir; // 0700 doesn't work in python3
%feature("python:defaultargs", "0") CUtils::GetNumInput; // SyntaxError: non-default argument follows default argument
%feature("python:defaultargs", "0") CModules::GetAvailableMods; // NameError: name 'UserModule' is not defined
%feature("python:defaultargs", "0") CModules::GetDefaultMods; // NameError: name 'UserModule' is not defined
%begin %{
#include "znc/zncconfig.h"
%}