Extensions on Windows, questions for experts.

Robin Becker robin at jessikat.fsnet.co.uk
Wed Jan 16 06:14:35 EST 2002


In article <3C453F5F.1F0F28E5 at luc.ac.be>, Michel Van den Bergh
<vdbergh at luc.ac.be> writes
>Well everybody seems to agree that what I am proposing is
>not practical (or at least very difficult) due to the layout of
>the data structures problem. But why does this not seem to be an
>issue in Linux? Maybe I was just lucky up to now?
>
>Regards,
>Michel
....
I guess it depends on what bits of the API you're using. If you're only
passing objects to and from python simple API routines then you don't
need much more than their addresses so you might get away with quite a
lot. As soon as you get inside the structures the differences will begin
to show up.

Luckily the start up API calls seem to be relatively stable so I can
almost get away with passing strings into PyRun_SimpleString etc etc.

One major handicap is that the Python API is partly implemented in
macros and they clearly need access to the underlying structures. As
example Py_INCREF et al. This means that any serious extension has no
hope of doing those operations with out knowing the object structure. It
would cost very little to make a proper OO routines for these to allow
for much more robust extensions.
-- 
Robin Becker



More information about the Python-list mailing list