[IronPython] Announcement: Project to get some CPython C extensions running under IronPython

Giles Thomas giles.thomas at resolversystems.com
Wed Oct 17 16:58:19 CEST 2007


Curt Hagenlocher wrote:
> On 10/17/07, *Paolo Molaro* <lupus at ximian.com 
> <mailto:lupus at ximian.com>> wrote:
>
>     As python extensions use a C API, I don't see how Managed C++
>     would provide source compatibility. Managed C++ would be an
>     ill-advided
>     method, IMHO.
>     [...]
>     You'd have two components: the C API headers and some C code (this is
>     required in any case) is the first. Then you need an assembly that
>     translates from the C API to the IronPython model. You can write this
>     in nice C# + a few dllimports or with the ugly managed C++ (assuming
>     managed C++ can actually consume the python headers).
>
>
> MC++ lets you create a single module that contains both "normal" 
> machine code and MSIL, and takes care of the transitions between the 
> two.  There's no reason you can't compile the existing C code and link 
> it directly with the MC++ wrapper -- which is exactly what I 
> originally meant.

Curt - how does MC++ relate to using P/Invoke?  That is, is it P/Invoke 
plus some clever packaging stuff to allow you to produce a single 
assembly with both machine code and MSIL, or is there more to it than 
that?  Or is it something completely different?


Regards,

Giles

-- 
Giles Thomas
MD & CTO, Resolver Systems Ltd.
giles.thomas at resolversystems.com
+44 (0) 20 7253 6372

We're hiring! http://www.resolversystems.com/jobs/ 

17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79 
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20071017/e438398e/attachment.html>


More information about the Ironpython-users mailing list