Pointers in Slate.

Todd Fleming todd at flemingcnc.com
Wed Nov 10 10:51:18 PST 2004


How about storing it in a byte array?

This brings up a related question. Will Slate provide finallizers for 
dealing with external resources?

Todd

Michael Walter wrote:

>Two obvious possibilities:
>- You do it as file.c does (large static array & return the index as handles)
>- You return the pointer casted to LongInt, which is kind of fugly for
>several reasons, though.
>
>Cheers,
>Michael
>
>
>On Wed, 10 Nov 2004 15:44:54 -0300, Pupeno <pupeno at pupeno.com> wrote:
>  
>
>>I started working in a Cairo/X backend (I need a couple of xlib calls, so, I'm
>>making a backend for those calls as well). I'm making the xlib wrapper
>>separatly of the cairo wrapper so if someone wants to use the xlib wrapper
>>and not use the cair wrapper, he/she can.
>>I'm starting bit by bit... based on a cairo program that draws a spline.
>>The first thing the cairo program does is this:
>>Display *dpy = XOpenDisplay(0);
>>So I made a wrapper for XOpenDisplay... I pass a byte array to it that is
>>decoded to a char* (that 0 is a char*), but then, what do I do with dpy ?
>>Should I pass it back to Slate ? should I make an array of opened displays ?
>>I then will have a lot of other pointers... most of the time I don't care
>>what's inside... it is just for passing arround.
>>Thanks.
>>--
>>Pupeno: pupeno at pupeno.com - http://www.pupeno.com
>>
>>    
>>




More information about the Slate mailing list