clone 536145 -1
reassign -1 cython 0.10.3-1
retitle -1 cython: access to dictionary-like objects is broken

cython produces broken code, too:

* Jakub Wilk <[email protected]>, 2009-07-07, 22:33:
$ cat tmp.py
import weakref

class Object(object):
 pass

cdef object o, d
o = Object()
d = weakref.WeakValueDictionary()

def f(long x):
 d[x] = o

f(0)
f(-42)
print dict(d)

$ pyrexc tmp.pyx
$ gcc -fPIC -shared -I/usr/include/python2.5/ -lpython2.5 tmp.c -o tmp.so
$ python -c 'import tmp'
{0: <tmp.Object object at 0xb805994c>, -41: <tmp.Object object at 0xb805994c>}


As you can see, -42 magically turned into -41.

--
Jakub Wilk



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to