No shit (well, nice) I fall in the same trap again. It turns up that the 
file where cdCanvas is declared was included twice and so I apparently had 
two declarations of cdCanvas. Once I fixed this situation the program runs 
fine but this is  a hell of a slippery ground.

quinta-feira, 8 de Janeiro de 2015 às 23:40:47 UTC, J Luis escreveu:
>
> Hi,
>
> I need to convert a structure of function pointers into a composite type. 
> The struct looks like this
>
> struct cdCanvas {
>   void   (*cxPixel)(cdCtxCanvas* ctxcanvas, int x, int y, long color);
>   void   (*cxLine)(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2);
>   void   (*cxPoly)(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int 
> n);
> ...
>
> used Clang.jl but it converted it to
>
> type cdCanvas
>     cxPixel::Ptr{Void}
>     cxLine::Ptr{Void}
>     cxPoly::Ptr{Void}
> ...
>
> which is not correct (ccall crash when using this type), but I don't know 
> either how to write it manually.
>
> Any advise?
>
> Thanks
>

Reply via email to