Re: Pointers

Javier Correa <[email protected]> Tue, 9 Nov 2010 17:56:12 +0000
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
--===============1875477984==
Content-Type: multipart/alternative; boundary=20cf3054a885d6ea8f0494a274bd

--20cf3054a885d6ea8f0494a274bd
Content-Type: text/plain; charset=UTF-8

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 <[email protected]> wrote:

> Javier Correa, 09.11.2010 18:16:
>
>  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
>>
>
> ctypedef SCRAM *what*?
>
> 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...

--20cf3054a885d6ea8f0494a274bd
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

The C typedef is:<div><br></div><div>typedef struct _CMesaDevice *SRCAM;</d=
iv><div><br></div><div>and I don&#39;t have access to _CMesaDevice declarat=
ion.</div><div><br></div><div>I was trying to use an incomplete type as in=
=C2=A0<a href=3D"http://ldots.org/pyrex-guide/4-functions.html#incomplete_t=
ypes">http://ldots.org/pyrex-guide/4-functions.html#incomplete_types</a><br=
>
<br><div class=3D"gmail_quote">On Tue, Nov 9, 2010 at 5:39 PM, Stefan Behne=
l <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">stefan_ml@be=
hnel.de</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Javier Correa, 09.11.2010 18:16:<div class=3D"im"><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I-m new to pyrex and I&#39;m trying to use it to have access to a library<b=
r>
(MesaSR, <a href=3D"http://www.mesa-imaging.ch/drivers.php" target=3D"_blan=
k">http://www.mesa-imaging.ch/drivers.php</a>), but I can&#39;t make use of=
<br>
pointers.<br>
<br>
I can&#39;t seem to define a function that one of its arguments it&#39;s a =
pointer<br>
(a function that initialize the structure). I&#39;m also having troubles wi=
th<br>
using the SR_GetImage that returns a void* pointer.<br>
<br>
My code is as follows:<br>
<br>
import numpy<br>
<br>
cdef extern from &quot;libMesaSR.h&quot;:<br>
 =C2=A0 =C2=A0ctypedef SRCAM<br>
</blockquote>
<br></div>
ctypedef SCRAM *what*?<br><font color=3D"#888888">
<br>
Stefan<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Javier Correa<br=
><br>Por favor, no imprimas este e-mail si realmente no lo necesitas... Con=
servar el medio ambiente es nuestra tarea... <br>Please, don&#39;t print th=
is e-mail if it&#39;s not needed... preserve the environment is our task...=
<br>
<br>
</div>

--20cf3054a885d6ea8f0494a274bd--


--===============1875477984==
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

_______________________________________________
Pyrex mailing list
[email protected]
http://lists.copyleft.no/mailman/listinfo/pyrex

--===============1875477984==--