[Python-Dev] compiling python2.5 on linux under wine (original) (raw)

Luke Kenneth Casson Leighton lkcl at lkcl.net
Thu Jan 8 14:53:57 CET 2009


On Thu, Jan 8, 2009 at 12:42 PM, Simon Cross <hodgestar+pythondev at gmail.com> wrote:

On Sat, Jan 3, 2009 at 11:22 PM, Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:

secondly, i want a python25.lib which i can use to cross-compile modules for poor windows users despite sticking to my principles and keeping my integrity as a free software developer. If this eventually leads to being able to compile Python software for Windows under Wine (using for example, py2exe) it would make my life a lot easier.

that looks like being an accidental side-effect, yes.

where i'm up to so far:

the fly in the ointment i'm presently trying to track down: len([1,2]) returns 1L which of course screws up sre_parse.py at line 515 with "TypeError: nonzero should return an int" because duh "if subpattern" is returning a Long not an Int.

tracking this down further, it would appear that there's some lovely logic in PyInt_FromSsize_t() which i believe is what's getting called from PyInt_AsSsize_t() which is what's getting called from slot_sq_length() (i think) - and, although in this case this build is definitely returning a Long type when it shouldn't, if the value is ever over LONG_MAX then the result will be "if subpattern" will definitely fail.

but... i mean... if ever anyone passes in over 2^^31 items into sre_parse then they deserve to have their code fail, but that's not the point.

anyway, i'm floundering around a bit and making a bit of a mess of the code, looking for where LONG_MAX is messing up.

l.

which of course means that there's a bug in



More information about the Python-Dev mailing list