chris wrote:
> This is my first attempt at undertaking a C extension module. I want
> to wrap an existing C library so I can call the functions from Python.
> There are only two functions I'm interested in calling. I did mess
> with Pyrex a bit and Swig, to no avail, so I turned to doing it by
>
Ok, I found further examples on the Internet and got something working
(it seems), but I have a question about the memory management. The
example I found did not include any of the PyMem_... functions.
Here's roughly what I have working:
cdef extern from "my.h":
cdef struct inputs:
char
Many thanks Robert. That will be a good starting point.
-Chris
http://auslunch.com/
http://fetidcascade.com/
http://strombergers.com/python/
--
http://mail.python.org/mailman/listinfo/python-list
chris wrote:
> Any tips on what the pyrex should look like for my example?
# Untested and off the top of my head; please read the Pyrex
# documentation and correct my mistakes before using any of this!
# Notably, I'm pretty sure the __init__ and __dealloc__ bits are
# slightly wrong.
cdef extern
Any tips on what the pyrex should look like for my example?
--
http://mail.python.org/mailman/listinfo/python-list
chris wrote:
> This is my first attempt at undertaking a C extension module. I want
> to wrap an existing C library so I can call the functions from Python.
> There are only two functions I'm interested in calling. I did mess
> with Pyrex a bit and Swig, to no avail, so I turned to doing it by
>