Fix imports in Cython/Include/numpy.pxd.
authorCraig Citro <craigcitro@gmail.com>
Fri, 9 Jul 2010 07:25:37 +0000 (00:25 -0700)
committerCraig Citro <craigcitro@gmail.com>
Fri, 9 Jul 2010 07:25:37 +0000 (00:25 -0700)
Cython/Includes/numpy.pxd
tests/run/type_inference.pyx

index dd6da0c6580ccc2576c763de23d947182b52b07d..20b116d0dd26b6baf0dd6e402973e55e2a9e0a57 100644 (file)
 DEF _buffer_format_string_len = 255
 
 cimport cpython.buffer as pybuf
-from cpython cimport PyObject, Py_INCREF, Py_XDECREF
-from libc cimport stdlib
-from libc cimport stdio
+from cpython.ref cimport Py_INCREF, Py_XDECREF
+from cpython.object cimport PyObject
+cimport libc.stdlib as stdlib
+cimport libc.stdio as stdio
 
 cdef extern from "Python.h":
     ctypedef int Py_intptr_t
index f7fe85510c6b81b76106089521d080677d40d80a..43c30c34b6e3fda6c1bb2afa0f23d8121a9410f0 100644 (file)
@@ -363,9 +363,11 @@ def safe_only():
     assert typeof(d) == "long", typeof(d)
 
     # we special-case inference to type str, see
-    # trac # 
+    # trac #553 
     s = "abc"
     assert typeof(s) == "Python object", typeof(s)
+    cdef str t = "def"
+    assert typeof(t) == "str object", typeof(t)
 
     # potentially overflowing arithmetic
     e = 1