Armin Rigo <arigo at tunes.org> writes: > Hi Skip, > > On Wed, Jun 15, 2005 at 06:35:10AM -0700, montanaro at users.sourceforge.net wrote: >> Why this worked is a bit mystical. Perhaps it never gets freed because the >> object just happens never to be DECREF'd (but that seems unlikely). >> /* Add the Dialect type */ >> + Py_INCREF(&Dialect_Type); >> if (PyModule_AddObject(module, "Dialect", (PyObject *)&Dialect_Type)) >> return; > > 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). I don't understand how thread._local differed from _cvs.Dialect, though. Cheers, mwh -- faassen: anyway, if nothing else flapping your arms running around will at least give an impression of activity. :)
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