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
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