Hi Paolo,
Could you provide an example of how to use the new call
call-out short cuts?
Thank you kindly,
Brad Watson
----- Original Message ----
From: Paolo Bonzini <paolo.bonzini lu.unisi.ch>
To: Krishna <v.krishnakrishna gmail.com>
Cc: help-smalltalk gnu.org
Sent: Wednesday, November 15, 2006 4:43:22 AM
Subject: [Help-smalltalk] Re: freeglut and opengl bindings
> With SWIG, we get instant access to bindings for a lot
of libs.
> Sometime back, took a look at the SWIG manual but my
smalltalk is
> quite poor and I never really got the time to learn the
language
> properly. Gotta do something about that...
Actually, most of porting SWIG would be about C/C++ coding.
It creates
C/C++ wrappers for all the functions -- quite different from
what Brad
has done so far, for example -- which accept language
objects and call
the underlying function. It could actually be faster if we
had a
primitive to do a C call directly, with no interpretation in
cint.c.
While I was working on speeding up C call-outs, I just added
a small
feature. If you declare a method with <cCall:
'function'> (i.e. no
returning: or args: keywords), it is the same as passing all
the
arguments as #smalltalk, plus (if the method is on the
instance side)
passing the receiver as #selfSmalltalk. This would be the
calling
convention that SWIG needs, and the new syntax (which is
only a shortcut
so far) might be transformed to a primitive if the SWIG plan
materialized.
Paolo
_______________________________________________
help-smalltalk mailing list
help-smalltalk gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk
____________________________________________________________
________________________
Sponsored Link
$420k for $1,399/mo.
Think You Pay Too Much For Your Mortgage?
Find Out! www.LowerMyBills.com/lre
_______________________________________________
help-smalltalk mailing list
help-smalltalk gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk
|