Commit 8568e5bf authored by Robert Bradshaw's avatar Robert Bradshaw

builtin type fixes

parent bbecb06a
...@@ -1520,15 +1520,12 @@ class SimpleCallNode(ExprNode): ...@@ -1520,15 +1520,12 @@ class SimpleCallNode(ExprNode):
# coerced_self ExprNode or None used internally # coerced_self ExprNode or None used internally
# wrapper_call bool used internally # wrapper_call bool used internally
# optimized_call str or None
subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple'] subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple']
self = None self = None
coerced_self = None coerced_self = None
arg_tuple = None arg_tuple = None
wrapper_call = False wrapper_call = False
optimized_call = None
def compile_time_value(self, denv): def compile_time_value(self, denv):
function = self.function.compile_time_value(denv) function = self.function.compile_time_value(denv)
......
...@@ -3902,10 +3902,10 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed ...@@ -3902,10 +3902,10 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed
} }
if (none_allowed && obj == Py_None) return 1; if (none_allowed && obj == Py_None) return 1;
else if (exact) { else if (exact) {
if (PyObject_TypeCheck(obj, type)) return 1; if (obj->ob_type == type) return 1;
} }
else { else {
if (obj->ob_type == type) return 1; if (PyObject_TypeCheck(obj, type)) return 1;
} }
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"Argument '%s' has incorrect type (expected %s, got %s)", "Argument '%s' has incorrect type (expected %s, got %s)",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment