Hi,

The bug is here :

    (#data (#ptr #XcbScreen))

Change this line with : 

    (#data #{XcbScreen})

Cheers,
Gwenael

On Sun, 2009-09-27 at 21:04 +0400, Dmitry Matveev wrote:
> Hi everybody!
> 
> I am going to write the XCB binding for GNU Smalltalk and now I'm
> playng with C call-outs.
> 
> I've got an issue in the case when C function returns a structure
> itself (not a pointer).
> 
> There are two files in attachments:
>  * rootwin.c - the C code that aquires current screen and prints the
> root window's ID
>  * xcbroot.st - the Smalltalk port of rootwin.c
> 
> `--> ./rootwin
> root window 163
> 
> `--> gst -f xcbroot.st
> xcbroot.st:56: Aborted
> (ip 10)CUInt(CScalar)>>#value
> (ip 6)UndefinedObject>>#executeStatements
> (ip 0)<bottom>
> zsh: abort      gst -f xcbroot.st
> 
> I assume that I missunderstood something about pointer-to-structure
> conversions, however I wrote this code according to GST manual (C data
> types, etc). I think I did something wrong.
> 
> Could anybody please help me with this problem?
> _______________________________________________
> help-smalltalk mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk



_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to