diff --git a/llvm/core.py b/llvm/core.py index f38028b..268318a 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -1729,7 +1729,7 @@ class CallOrInvokeInstruction(Instruction): return _make_value(function) def _set_called_function(self, function): - self._ptr.setCalledFunction(function) + self._ptr.setCalledFunction(function._ptr) called_function = property(_get_called_function, _set_called_function) diff --git a/llvmpy/include/llvm_binding/conversion.h b/llvmpy/include/llvm_binding/conversion.h index 1c629b7..5395a3f 100644 --- a/llvmpy/include/llvm_binding/conversion.h +++ b/llvmpy/include/llvm_binding/conversion.h @@ -124,8 +124,8 @@ int py_int_to(PyObject *intobj, unsigned & val){ static int py_int_to(PyObject *intobj, unsigned long long & val){ if (!PyInt_Check(intobj) and !PyLong_Check(intobj)) { - // raise TypeError - PyErr_SetString(PyExc_TypeError, "Expecting an int 2"); + // raise TypeError; + PyErr_SetString(PyExc_TypeError, "Expecting an int"); return 0; } val = PyInt_AsUnsignedLongLongMask(intobj); diff --git a/llvmpy/src/Instruction.py b/llvmpy/src/Instruction.py index 1974aad..beb94f1 100644 --- a/llvmpy/src/Instruction.py +++ b/llvmpy/src/Instruction.py @@ -134,7 +134,7 @@ class BinaryOperator: @CallInst class CallInst: - _downcast_ = Value, Instruction + _downcast_ = Value, User, Instruction getCallingConv = Method(CallingConv.ID) setCallingConv = Method(Void, CallingConv.ID) @@ -277,7 +277,7 @@ class IndirectBrInst: @InvokeInst class InvokeInst: - _downcast_ = Value, Instruction + _downcast_ = Value, User, Instruction getCallingConv = Method(CallingConv.ID) setCallingConv = Method(Void, CallingConv.ID) getParamAlignment = Method(cast(Unsigned, int), cast(int, Unsigned))