Delphi extension

John J. Lee jjl at pobox.com
Sun Jun 27 23:28:07 CEST 2004


Jarek Zgoda <jzgoda at gazeta.usun.pl> writes:

> Christopher T King <squirrel at WPI.EDU> pisze:
> 
> > I don't know anything about Delphi; it may use a different calling 
> > convention than C (unlikely). If that's the case, however, you're out of 
> > luck unless you can find a Delphi-C or Delphi-Python interface module.
> 
> Register is default call convention for libraries written in Delphi, but
> one may use any other at will.

A bit of a Delphic utterance...

Googling, it seems 'Register' is what MSVC calls __fastcall.

Not sure how you tell which Delphi functions obey which calling
convention, but (in the absence of a more polished method) I think I'd
attempt to find that out, then write a thin wrapper of the Delphi
interface in C, with explicit calling convention declarations
(eg. __fastcall), then wrap *that* with SWIG.


John



More information about the Python-list mailing list