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

Curt Hagenlocher curt at hagenlocher.org
Wed Oct 17 16:44:04 CEST 2007

On 10/17/07, Paolo Molaro <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.

> A Managed C++ implementation would be pretty useless for a mono port,
> but I think it would be pretty useless for the .net runtime, as you need
> to expose a C API anyway.
Of course, if Managed C++ isn't supported by Mono, that's probably a
sufficiently good reason not to take this approach.

Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20071017/086fff4f/attachment.html>

More information about the Ironpython-users mailing list