for option in options:
name, value = option
optdict[name] = value
- return self.visit_with_options(node, options)
+ return self.visit_with_options(node, optdict)
else:
return self.visit_Node(node)
cimport stdio
cimport cython
-cimport refcount
+from python_ref cimport PyObject
__test__ = {}
setup_string = """
for item in args: Py_DECREF(item)
def get_refcount(x):
- return refcount.CyTest_GetRefcount(x)
+ return (<PyObject*>x).ob_refcnt
@testcase
def printbuf_object(object[object] buf, shape):
"""
cdef int i
for i in range(shape[0]):
- print repr(buf[i]), refcount.CyTest_GetRefcount(buf[i])
+ print repr(buf[i]), (<PyObject*>buf[i]).ob_refcnt
@testcase
def assign_to_object(object[object] buf, int idx, obj):