Bug fixes

This commit is contained in:
Siu Kwan Lam 2013-02-26 18:43:49 -06:00
commit dd9ba65328
3 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

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