From 4806fbd8bca1e13a16f8053cc5674c9715f51c50 Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Fri, 9 Jul 2010 00:25:37 -0700 Subject: [PATCH] Fix imports in Cython/Include/numpy.pxd. --- Cython/Includes/numpy.pxd | 7 ++++--- tests/run/type_inference.pyx | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) 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 -- 2.26.2