builtin type fixes
authorRobert Bradshaw <robertwb@math.washington.edu>
Mon, 28 Apr 2008 18:19:48 +0000 (11:19 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Mon, 28 Apr 2008 18:19:48 +0000 (11:19 -0700)
Cython/Compiler/ExprNodes.py
Cython/Compiler/Nodes.py

index 63110a1744269862d1010a37b5cbe3bf394518d9..1d656f9570e597cc64255a431ebf41710b5d20e1 100644 (file)
@@ -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)
index 2b6927f082a5eaf8fd98fd12d31206885e03d399..544b9cd9394a44d128db654350aaed8106a9eacb 100644 (file)
@@ -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)",