[Python-Dev] pymalloc API - is 1.5.2 compatibility a possible explanation? (original) (raw)
Michael Hudson mwh@python.net
19 Mar 2002 09:28:35 +0000
- Previous message: [Python-Dev] pymalloc API - is 1.5.2 compatibility a possible explanation?
- Next message: [Python-Dev] pymalloc API - is 1.5.2 compatibility a possible explanation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Skip Montanaro <skip@pobox.com> writes:
1.5.2 rears its ugly head again...
Neil S. reported on a number of 3rd party extension modules that don't do object alloc/free properly. I reported a bug to the mysql-python project, which uses PyObjectNEW and PyMemFree. Andy Dustman's reply, in part, was: 1.5.2 apparently does not have PyObjectNew() or PyObjectDel(), thus the problem... The thread is here: http://sourceforge.net/tracker/?func=detail&atid=374932&aid=531671&groupid=22307 Check here for Andy's proposed patch to mysql.c (ignore the non-alloc stuff): http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mysql-python/MySQLdb/mysql.c.diff?r1=1.16&r2=1.22
Better IMHO is what _sre.c does:
#if PY_VERSION_HEX < 0x01060000 #define PyObject_DEL(op) PyMem_DEL((op)) #endif
... except that should probably be _Del & there should probably be an equivalent one for PyObject_New.
It would appear at least some of the breakage stems from actual or perceived differences in the object allocation API between 1.5.2 and 2.x.
I thought we'd already worked this much out...
Cheers, M.
-- ... but I'd rather not reinvent the wheel if I don't have to. On the other hand, if the currently instantiated version of the wheel consists of a square rock covered with moss, I might as well just start fresh. -- Roy Smith, comp.lang.python
- Previous message: [Python-Dev] pymalloc API - is 1.5.2 compatibility a possible explanation?
- Next message: [Python-Dev] pymalloc API - is 1.5.2 compatibility a possible explanation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]