From: Wouter Wijngaards Date: Mon, 30 May 2016 14:26:45 +0000 (+0000) Subject: - Attempted fix for #765: _unboundmodule missing for python3. X-Git-Tag: release-1.5.9rc1~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=688fa185b07986be2d51a80ec3e2f51e8363502f;p=thirdparty%2Funbound.git - Attempted fix for #765: _unboundmodule missing for python3. git-svn-id: file:///svn/unbound/trunk@3733 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 286a21348..8d7b9a17a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 30 May 2016: Wouter - Fix time in case answer comes from cache in ub_resolve_event(). + - Attempted fix for #765: _unboundmodule missing for python3. 27 May 2016: Wouter - Fix #770: Small subgroup attack on DH used in unix pipe on localhost diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index 48dbc0169..6c5e6392d 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -141,6 +141,9 @@ int pythonmod_init(struct module_env* env, int id) #endif Py_SetProgramName(progname); Py_NoSiteFlag = 1; +#if PY_MAJOR_VERSION >= 3 + PyImport_AppendInittab(SWIG_name, (void*)SWIG_init); +#endif Py_Initialize(); PyEval_InitThreads(); SWIG_init();