A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054244.html below:

[Python-Dev] [Python-checkins] python/dist/src/Modules _csv.c, 1.37, 1.38

[Python-Dev] [Python-checkins] python/dist/src/Modules _csv.c, 1.37, 1.38Armin Rigo arigo at tunes.org
Wed Jun 15 18:48:21 CEST 2005
Hi Michael,

On Wed, Jun 15, 2005 at 03:26:00PM +0100, Michael Hudson wrote:
> > Hum, you probably don't want to know, but it works just fine to forget
> > a Py_INCREF before PyModule_AddObject() for the following reason:
> 
> No, it's more complicated than that, at least in an embedded
> scenario (see bug #1220756).

Uh, yes, indeed.  I guess that my explanations don't survive an
interpreter shutdown, after which the reference counter of the object
effectively drops to zero.  I don't see how this doesn't crash Python
when you exit.  It could be that the gc is not called after the
reference from the import mechanism was effectively removed -- type
objects after a PyType_Ready() are full of ref cycles.  But it's all
quite obscure.


Armin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4