]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Attempted fix for #765: _unboundmodule missing for python3.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 30 May 2016 14:26:45 +0000 (14:26 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 30 May 2016 14:26:45 +0000 (14:26 +0000)
git-svn-id: file:///svn/unbound/trunk@3733 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
pythonmod/pythonmod.c

index 286a2134885d74e5cbadbd86e92d07a7a56989c6..8d7b9a17a6e8421d0dae4fb5d52c355385c41095 100644 (file)
@@ -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
index 48dbc01698cb3263ecb51ae5ab5d3b39edb738b2..6c5e6392df4be0bae0467205c0a5806c920f0ff9 100644 (file)
@@ -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();