Fix invalid use of long for address. Use unsigned long long for cross-platform 64-bit int.

This commit is contained in:
Siu Kwan Lam 2013-01-08 16:09:45 -06:00
commit 64880e7d69

View file

@ -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;