Package: python-pyrex
Version: 0.9.8.5-1
Severity: important

(This bug is somewhat related to #483035.)

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


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pyrex depends on:
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-central                0.6.11     register and build utility for Pyt

Versions of packages python-pyrex recommends:
ii  python-all-dev                2.5.4-2    Package depending on all supported

python-pyrex suggests no packages.

-- no debconf information

--
Jakub Wilk



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

Reply via email to