mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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"
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user