On 10/17/07 Curt Hagenlocher wrote:
> On 10/17/07, Paolo Molaro <[EMAIL PROTECTED]> wrote:
> > The python API requires a couple dozen structure definitions plus a few
> > dozen dllimport declarations. This can be about 200 lines of trivial
> > to write declarative stuff.
>
> I'm having trouble understanding what you mean by this. Let's say I've got
> an extension method that looks like this:
>
> PyObject * ModifyColumns(PyObject * self, PyObject * args)
> {
[...]
> In order to use this extension from IronPython, I need C implementations of
> each of those API functions. The PySequence_ methods should to be able to
> understand CLR arrays or any other IEnumerable-like object. I'm not sure
> what PyTuple_New should return, but whatever it is will need to have
> PyObject*-like semantics.
>
> How does DllImport fit into this picture? How can I avoid implementing all
> these functions in C or C++?
You do need to write C code as the API is a C API. I didn't list in the
last mail because the C implementation of these functions is not a
difference between the C# impl and the C++ impl of the rest of the code.
The dllimport declarations I mentioned above would pinvoke to these C
functions.
lupus
--
-----------------------------------------------------------------
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com