Fix invalid use of long for address. Use unsigned long long for cross-platform 64-bit int.
This commit is contained in:
parent
ee2d86e86f
commit
64880e7d69
1 changed files with 2 additions and 5 deletions
|
|
@ -1348,17 +1348,14 @@ _wLLVMAddGlobalMapping(PyObject *self, PyObject *args)
|
||||||
LLVMPY_TRY
|
LLVMPY_TRY
|
||||||
PyObject *obj_ee;
|
PyObject *obj_ee;
|
||||||
PyObject *obj_val;
|
PyObject *obj_val;
|
||||||
long int address;
|
unsigned long long address;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OOl", &obj_ee, &obj_val, &address))
|
if (!PyArg_ParseTuple(args, "OOK", &obj_ee, &obj_val, &address))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
const LLVMExecutionEngineRef ee = pycap_get<LLVMExecutionEngineRef>( obj_ee );
|
const LLVMExecutionEngineRef ee = pycap_get<LLVMExecutionEngineRef>( obj_ee );
|
||||||
const LLVMValueRef val = pycap_get<LLVMValueRef>( obj_val );
|
const LLVMValueRef val = pycap_get<LLVMValueRef>( obj_val );
|
||||||
|
|
||||||
if (address == (unsigned long long)-1)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
LLVMAddGlobalMapping(ee, val, (void*) address);
|
LLVMAddGlobalMapping(ee, val, (void*) address);
|
||||||
|
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue