From: Robert Bradshaw Date: Wed, 6 Jan 2010 18:46:32 +0000 (-0800) Subject: Arg increfing test. X-Git-Tag: 0.13.beta0~2^2~114 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42c6c6f54abe88a467d7a589c60a6b485cc49ece;p=cython.git Arg increfing test. --- diff --git a/tests/run/arg_incref.pyx b/tests/run/arg_incref.pyx new file mode 100644 index 00000000..cabc0b86 --- /dev/null +++ b/tests/run/arg_incref.pyx @@ -0,0 +1,12 @@ +def f(dict d): + """ + >>> f({1:1, 2:2}) + [1, 2] + """ + cdef dict d_new = {} + l = [] + for k in d: + d = d_new + l.append(k) + l.sort() + return l