about summary refs log tree commit diff stats
path: root/miasm2/jitter/Jitgcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/jitter/Jitgcc.c')
-rw-r--r--miasm2/jitter/Jitgcc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/miasm2/jitter/Jitgcc.c b/miasm2/jitter/Jitgcc.c
index 3e7225cb..8b789f70 100644
--- a/miasm2/jitter/Jitgcc.c
+++ b/miasm2/jitter/Jitgcc.c
@@ -35,7 +35,7 @@ PyObject* gcc_exec_bloc(PyObject* self, PyObject* args)
 		// Get the expected jitted function address
 		func_py = PyDict_GetItem(lbl2ptr, retaddr);
 		if (func_py)
-			func = (jitted_func) PyInt_AsLong((PyObject*) func_py);
+			func = (jitted_func) PyLong_AsVoidPtr((PyObject*) func_py);
 		else {
 			if (BlockDst.is_local == 1) {
 				fprintf(stderr, "return on local label!\n");
@@ -44,7 +44,6 @@ PyObject* gcc_exec_bloc(PyObject* self, PyObject* args)
 			// retaddr is not jitted yet
 			return retaddr;
 		}
-
 		// Execute it
 		status = func(&BlockDst, jitcpu);
 		Py_DECREF(retaddr);