[Python-porting] Porting 2.1 to 2.7 without source

Paulo Levi i30817 at gmail.com
Mon Mar 14 06:46:16 CET 2011


I'm confused. Isn't that only possible if you can control the source (or
have enough debugging skill)? I don't actually have a compilable form of the
source for the c extension, and i only see those structs initializations on
them.

On Sun, Mar 13, 2011 at 11:44 AM, Lennart Regebro <regebro at gmail.com> wrote:

> On Sat, Mar 12, 2011 at 17:47, Paulo Levi <i30817 at gmail.com> wrote:
> > Well, i just used python source 2.1.3 (supposedly one minor version above
> > what troika used, and the same problem occurs though probably not on the
> > same place (i haven't bothered to track it down here, since it doesn't
> occur
> > on typeobject.c anymore). Anyway to disable that optimization in visual
> > studio c++ 6.0 to be sure it's not that?
>
> I don't know, but you can change
>
>    PyObject_HEAD_INIT(NULL)
>    0, /* ob_size */
>
> to
>
>    PyVarObject_HEAD_INIT(NULL, 0)
>
> That won't work on Python 2.5 or earlier, but it should work under
> Python 2.6 and 2.7. I don't have any real reason to believe this to be
> the problem, but it could be worth a try.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20110314/40644cdc/attachment.html>


More information about the Python-porting mailing list