From: Craig Citro Date: Fri, 9 Jul 2010 07:25:37 +0000 (-0700) Subject: Fix imports in Cython/Include/numpy.pxd. X-Git-Tag: 0.13.beta0~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4806fbd8bca1e13a16f8053cc5674c9715f51c50;p=cython.git Fix imports in Cython/Include/numpy.pxd. --- diff --git a/Cython/Includes/numpy.pxd b/Cython/Includes/numpy.pxd index dd6da0c6..20b116d0 100644 --- a/Cython/Includes/numpy.pxd +++ b/Cython/Includes/numpy.pxd @@ -17,9 +17,10 @@ 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 diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx index f7fe8551..43c30c34 100644 --- a/tests/run/type_inference.pyx +++ b/tests/run/type_inference.pyx @@ -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