rich comparison fscks up reference count?

Gerhard Häring gerhardhaering at googlemail.com
Mon Apr 12 20:55:05 CEST 2010


On Apr 12, 4:27 pm, Gerhard Häring <gerhardhaer... at googlemail.com>
wrote:
> Maybe somebody can enlighten me here. I can't figure out why doing a
> rich comparison on my object decreases the total reference count by 1. [...]

Doh! It turned out the strange effect was due to my particular build
process.
My Python 2.6/3.1 are built using our own SCons-based build and the
corresponding Makefile that distutils then uses didn't have the same
DEFINEs.

So, the Python was built with Py_REF_DEBUG, but Py_REF_DEBUG was not
defined
when I built my extension module. Which fscked up the *total*
reference
counting  (sys.gettotalrefcount()).

-- Gerhard



More information about the Python-list mailing list