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,16 +1348,13 @@ _wLLVMAddGlobalMapping(PyObject *self, PyObject *args)
|
|||
LLVMPY_TRY
|
||||
PyObject *obj_ee;
|
||||
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;
|
||||
|
||||
const LLVMExecutionEngineRef ee = pycap_get<LLVMExecutionEngineRef>( obj_ee );
|
||||
const LLVMValueRef val = pycap_get<LLVMValueRef>( obj_val );
|
||||
|
||||
if (address == (unsigned long long)-1)
|
||||
return NULL;
|
||||
|
||||
LLVMAddGlobalMapping(ee, val, (void*) address);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue