[Python-porting] Porting 2.1 to 2.7 without source

Paulo Levi i30817 at gmail.com
Sun Mar 13 05:26:05 CET 2011


Also a interesting incompatibility occurred that i've just noticed. The game
didn't recognize the bool type as a int (as it expected the expression)
although bool is a subtype of int.

When i put this in PyRun_String that went away:

            r = PyRun_StringFlags(str, s, g, l, NULL);
            if(r != NULL && PyBool_Check(r)){
                if(r == Py_True)
                    return PyInt_FromLong(1L);
                else
                    return PyInt_FromLong(0L);
            }
            return r;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-porting/attachments/20110313/4e1d16be/attachment.html>


More information about the Python-porting mailing list