Back: CByte-accessing Up: Base classes Forward: CCallable class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.21 CCallable

Defined in namespace Smalltalk
Superclass: CObject
Category: Language-C interface
I am not part of the Smalltalk definition. My instances contain information about C functions that can be called from within Smalltalk, such as number and type of parameters. This information is used by the C callout mechanism to perform the actual call-out to C routines.

1.21.1 CCallable class: instance creation  (class)
1.21.2 CCallable: accessing  (instance)
1.21.3 CCallable: calling  (instance)
1.21.4 CCallable: restoring  (instance)


1.21.1 CCallable class: instance creation

for: aCObject returning: returnTypeSymbol withArgs: argsArray
Answer a CFunctionDescriptor with the given address, return type and arguments. The address will be reset to NULL upon image save (and it's the user's task to figure out a way to reinitialize it!)


1.21.2 CCallable: accessing

isValid
Answer whether the object represents a valid function.

returnType
Not commented.


1.21.3 CCallable: calling

asyncCall
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the parent context. Asynchronous call-outs don't return a value, but if the function calls back into Smalltalk the process that started the call-out is not suspended.

asyncCallNoRetryFrom: aContext
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the base of the stack of aContext. Asynchronous call-outs don't return a value, but if the function calls back into Smalltalk the process that started the call-out is not suspended. Unlike #asyncCallFrom:, this method does not attempt to find functions in shared objects.

callInto: aValueHolder
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the parent context, and the the result is stored into aValueHolder. aValueHolder is also returned.

callNoRetryFrom: aContext into: aValueHolder
Perform the call-out for the function represented by the receiver. The arguments (and the receiver if one of the arguments has type #self or #selfSmalltalk) are taken from the base of the stack of aContext, and the result is stored into aValueHolder. aValueHolder is also returned. Unlike #callFrom:into:, this method does not attempt to find functions in shared objects.


1.21.4 CCallable: restoring

link
Rebuild the object after the image is restarted.



Back: CCallable-calling Up: CCallable Forward: CCallbackDescriptor   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html