Re: opaque types, constructors, assignment - help please

Jani Hakala <[email protected]> Fri, 26 Feb 2010 16:22:21 +0200
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Jose Nazario <[email protected]> writes:

> working with FastBit, specifically it's C API:
>
> 	http://crd.lbl.gov/~kewu/fastbit/doc/html/group__FastBitCAPI.html
>
First definition there is
 'typedef struct FastBitQuery * FastBitQueryHandle'

> cdef extern from "../src/capi.h":
>     ctypedef extern struct FastBitQueryHandle
>
FastBitQueryHandle is not a struct but a pointer to a struct. =


------------------------------------------------------------------------
cdef extern from "capi.h":
    ctypedef struct FastBitQuery
    ctypedef FastBitQuery * FastBitQueryHandle

    FastBitQueryHandle fastbit_build_query(char * selectClause,
                                           char * indexLocation,
                                           char * queryConditions)

def test(selectClause, indexLocation, queryConditions):
    cdef FastBitQueryHandle qh

    qh =3D fastbit_build_query(selectClause, indexLocation, queryConditions)
------------------------------------------------------------------------

Jani Hakala