[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Watch for problems building pygame.transform on non-Windows operating systems.



Cheers.

I may have gone overboard here but this solves a vexing problem, how best to include assembly code in Pygame. Having assembly code routines in separate files has two problems. First, Python's distutils package lacks facilities for calling an assembler. Second, the portable C calling convention of 32 bit x86 machines has been broken for 64 bit machines. Windows does it one ways, Unix another. No more cross platform x86 assembly routines. Wrapping the assembly code in a C routine takes care of the inconsistent calling conventions. But GCC has one form of x86 assembly code, Visual C another. Keeping two versions of the same code would be a pain. But GCC is cross platform, and MinGW produces VC compatible object files, now confirmed for VC 6.0 and VC 2003. So the inlined assembly code can be written for GCC, with an object file generated for use in Windows builds. This opens the door to other optimized routines in Pygame.

Lenard


claudio canepa wrote:


On Wed, Oct 15, 2008 at 10:26 PM, Lenard Lindstrom <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

    It's alive! It's alive! My monster lives. A VC body with a MinGW
    heart. HaHaHaHaHa...

Cheers !!!

gmail don't like ascii art, so it is atacched

--

claxo



--
Lenard Lindstrom
<len-l@xxxxxxxxx>