[Pyrex] Best practice for wrapping struct

Victor Ng crankycoder at gmail.com
Tue Oct 26 14:19:00 CEST 2004


cdef extern from "example.h":
    cdef struct Example:
        int iVal
    Example* create(int)
    void destroy(Example* t)
    int mult(Example* t, int scalar, int shift)

vic

On Mon, 25 Oct 2004 22:03:33 -0400, Edward C. Jones <edcjones at erols.com> wrote:
> Here is the file "example.h":
> 
> typedef struct {
>     int iVal;
> } Example;
> 
> Example* create(int i);
> void destroy(Example* t);
> int mult(Example* t, int scalar, int shift);
> 
> What is currently the best way to wrap this as a Python class "Example"?
> 
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
>



More information about the Pyrex mailing list