help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] Some issues with C callouts


From: Dmitry Matveev
Subject: [Help-smalltalk] Some issues with C callouts
Date: Sun, 27 Sep 2009 21:04:01 +0400

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?

Attachment: rootwin.c
Description: Text Data

Attachment: xcbroot.st
Description: Binary data


reply via email to

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