sorry, my problem, I wasn't seeing a typo.
Defining:ctypedef struct _CMesaDevicectypedef _CMesaDevice * SRCAMgot rid of some problems, sorry I wasn't getting how to use the incomplet types.I still have a problem with the void* return type:Cannot convert 'void *' to Python objectwhen I try to do:...cdef void * images...image = SR_GetImage(self.cam, 0)On Tue, Nov 9, 2010 at 5:56 PM, Javier Correa <javier.correa@gmail.com> wrote:
The C typedef is:typedef struct _CMesaDevice *SRCAM;and I don't have access to _CMesaDevice declaration.I was trying to use an incomplete type as in http://ldots.org/pyrex-guide/4-functions.html#incomplete_types
On Tue, Nov 9, 2010 at 5:39 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:Javier Correa, 09.11.2010 18:16:ctypedef SCRAM *what*?
I-m new to pyrex and I'm trying to use it to have access to a library
(MesaSR, http://www.mesa-imaging.ch/drivers.php), but I can't make use of
pointers.
I can't seem to define a function that one of its arguments it's a pointer
(a function that initialize the structure). I'm also having troubles with
using the SR_GetImage that returns a void* pointer.
My code is as follows:
import numpy
cdef extern from "libMesaSR.h":
ctypedef SRCAM
Stefan
--
Javier Correa
Por favor, no imprimas este e-mail si realmente no lo necesitas... Conservar el medio ambiente es nuestra tarea...
Please, don't print this e-mail if it's not needed... preserve the environment is our task...
--
Javier Correa
Por favor, no imprimas este e-mail si realmente no lo necesitas... Conservar el medio ambiente es nuestra tarea...
Please, don't print this e-mail if it's not needed... preserve the environment is our task...