help-smalltalk
[Top][All Lists]
Advanced

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

Re: [Help-smalltalk] Using Smalltalk as a scripting language


From: Roland Plüss
Subject: Re: [Help-smalltalk] Using Smalltalk as a scripting language
Date: Thu, 29 Oct 2009 22:46:38 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090926)

>> As far as I get you can mess with the
>> pointer from smalltalk code.
>
> Then do the same that CObject does, but manually.  Make your class
> <shape: #byte> and create it with sizeof(void *) indexed instance
> variables (with gst_object_alloc).  At the end of the struct you can
> place a "void *opaque" data and set it after the call to
> gst_object_alloc.
When I get this correctly then this would be in fact gst_object_alloc(
oopClass, numberOfCOnlyBytes ); where numberOfCOnlyBytes is the number
of bytes I append to the struct which is not accessible to smalltalk. So
far so right? So I assume if I want to use this approach I have to
provide a cCall for #new which creates the object using the prior
mentioned gst_object_alloc bypassing the smalltalk creation call. Sounds
like quite the hack but it looks like it could work out.

-- 
Yours sincerely
Plüss Roland

Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.ch/ ,
http://www.moddb.com/games/4057/epsylon )
- Game Engine: Drag(en)gine ( http://dragengine.rptd.ch ,
http://www.moddb.com/engines/9/dragengine )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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