[Python-porting] Porting 2.1 to 2.7 without source

Paulo Levi i30817 at gmail.com
Sat Mar 12 13:01:05 CET 2011


There is a rather old game, "Vampire the Masquerade: Bloodlines" that used a
cut down python 2.1 for scripts. I am trying (and failing) to port it to a
more complete python version, and thought 2.7 would be a nice target being
the last same major version.

Well, anyway, i only need to add 3 missing functions (troika original),
expose "void _PyObject_Del(PyObject *op)" that appears to have been hidden
around 2.3, set a new home based on the dll path and the game starts up
(full of errors of course).

One error in special is bothering me, since it appears to be caused by
changes to the PyTypeObject struct. Whenever one of the "cvar" objects that
troika binded to the half life 2 engine gets to a certain level of the
scripting engine, a pagefault is almost inevitable. These happen in the
"PyType_Ready(PyTypeObject *type)" function for the base class (that
bizarrely appears neither to be PyBaseObject_Type or NULL, but 8), and when
adding methods to the dict, and i stopped trying to fix it there here.

Strangely tp_name is "cvar" as expected.


Is this a impossible dream?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20110312/dac7294c/attachment.html>


More information about the Python-porting mailing list