> -----Original Message----- > From: Amaury Forgeot d'Arc [mailto:amaur...@gmail.com] > Sent: 15. júní 2010 21:24 > To: Kristján Valur Jónsson > Cc: python-dev@python.org > Subject: Re: [Python-Dev] debug and release python > > I remember having the same issue years ago: > http://mail.python.org/pipermail/python-list/2004-July/855844.html > > At the time, I solved the issue by compiling extension modules with > pymalloc options turned on > (which it fortunately the default, so this applies to the supplied > proprietary .pyd), > and I added a (plain) definition for functions like > _PyObject_DebugMalloc, > even when PYMALLOC_DEBUG is undefined. > > Since the python_d.dll is a custom build anyway, adding the code is > not too much pain. >
It is not too much pain, once you realize the problem, no. But I just got bitten by this and spent the best part of a weekend trying to solve the problem. On Windows, you get an import failure on the .pyd file with the message: "Procedure entry point not found". I had come across this previously, some three years ago perhaps, and forgotten all about it, so I was sufficiently annoyed to post to python-dev. We use python27_d.dll a lot and typically have WITH_PYMALLOC disabled in debug build to for the benefit of using the debug malloc libraries present on windows. I've solved the issue now by making sure that obmalloc.c always exports _PyObject_DebugMalloc(), much as it always exports PyObject_Malloc() whether WITH_PYMALLOC is defined or not. My suggestion for python core would be the same: expose these always for existing python versions, and remove them from the API in new python versions. K _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com