From: Robert Bradshaw Date: Mon, 28 Apr 2008 18:19:48 +0000 (-0700) Subject: builtin type fixes X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8568e5bf61cb10f961d41de0fb29c6e32afc1dfe;p=cython.git builtin type fixes --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 63110a17..1d656f95 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -1520,15 +1520,12 @@ class SimpleCallNode(ExprNode): # coerced_self ExprNode or None used internally # wrapper_call bool used internally - # optimized_call str or None - subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple'] self = None coerced_self = None arg_tuple = None wrapper_call = False - optimized_call = None def compile_time_value(self, denv): function = self.function.compile_time_value(denv) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 2b6927f0..544b9cd9 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -3902,10 +3902,10 @@ static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed } if (none_allowed && obj == Py_None) return 1; else if (exact) { - if (PyObject_TypeCheck(obj, type)) return 1; + if (obj->ob_type == type) return 1; } else { - if (obj->ob_type == type) return 1; + if (PyObject_TypeCheck(obj, type)) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%s' has incorrect type (expected %s, got %s)",