about summary refs log tree commit diff stats
path: root/miasm2/jitter/Jitllvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/jitter/Jitllvm.c')
-rw-r--r--miasm2/jitter/Jitllvm.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/miasm2/jitter/Jitllvm.c b/miasm2/jitter/Jitllvm.c
index bb500d2e..efe5250f 100644
--- a/miasm2/jitter/Jitllvm.c
+++ b/miasm2/jitter/Jitllvm.c
@@ -3,6 +3,7 @@
 #include <inttypes.h>
 
 #include <stdint.h>
+#include "compat_py23.h"
 #include "queue.h"
 #include "vm_mngr.h"
 #include "vm_mngr_py.h"
@@ -82,13 +83,17 @@ static PyMethodDef LLVMMethods[] = {
     {NULL, NULL, 0, NULL}        /* Sentinel */
 };
 
-PyMODINIT_FUNC
-initJitllvm(void)
+
+
+
+MOD_INIT(Jitllvm)
 {
-    PyObject *m;
+	PyObject *module;
 
-    m = Py_InitModule("Jitllvm", LLVMMethods);
-    if (m == NULL)
-	    return;
+	MOD_DEF(module, "Jitllvm", "llvm module", LLVMMethods);
+
+	if (module == NULL)
+		return NULL;
 
+	return module;
 }