Hi Everyone,

As of r7230, there is now a soft dependency from LanguageKit to SourceCodeKit.  
SourceCodeKit is still a little bit work-in-progress, so if you don't have it 
installed / working then don't worry.  If you do, then you can now call C 
functions from Smalltalk trivially.  

When you load a framework (with -l on the edlc command line, or by specifying a 
list of frameworks in a LK bundle), it will now look for a framework header and 
parse it.  For example, if you parse FooKit, it will look for FooKit/FooKit.h.  
EtoileFoundation.h is always parsed, because programming without 
EtoileFoundation sucks.

So far, it's only using this information for a C function call interface.  I 
put together a couple of simple examples, using some functions from math.h as 
examples:

        C sqrt: 60
        C fdim: {60. 12}
        C f: 60 dim: 12

The second two forms are equivalent - write whichever makes more sense for the 
function.  Functions from C are probably better with the first, but ones from 
Smalltalk often have selector-like names, so it might make sense to split them 
up.  

David

-- Sent from my Xerox Alto


_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à