help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Some issues with C callouts


From: Gwenael Casaccio
Subject: Re: [Help-smalltalk] Some issues with C callouts
Date: Mon, 28 Sep 2009 15:19:58 +0200

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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-smalltalk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]