ExternalFunction.st
changeset 21623 0fd2de531f9a
parent 20957 9b5bcb4a87ce
--- a/ExternalFunction.st	Fri Mar 03 09:22:00 2017 +0100
+++ b/ExternalFunction.st	Fri Mar 03 16:21:23 2017 +0100
@@ -138,13 +138,13 @@
     Instances of this class represent external (non-Smalltalk) functions.
 
     (Obsolete) Custom Functions:
-        This class also provides access to custom functions.
-        These custom functions enable you to call c functions
-        even if no stc compiler is available (they are kind of what user-primitives are in ST-80).
-        You can register your own custom C-functions in a private main.c and relink ST/X from the binaries.
-        (see the demo functions provided in main.c).
-        Notice, that custom functions are ugly and inflexible.
-        They are to be considered obsolete and support for them will vanish.
+	This class also provides access to custom functions.
+	These custom functions enable you to call c functions
+	even if no stc compiler is available (they are kind of what user-primitives are in ST-80).
+	You can register your own custom C-functions in a private main.c and relink ST/X from the binaries.
+	(see the demo functions provided in main.c).
+	Notice, that custom functions are ugly and inflexible.
+	They are to be considered obsolete and support for them will vanish.
 
     If you have the stc compiler, we recommend using either inline primitive
     code or the new external function call interface which is based upon libffi.
@@ -160,22 +160,22 @@
     with the call / callWith: methods.
 
     ST-arguments are converted to C as follows:
-        ST class            C argument
-        ------------------------------
-        SmallInteger        int
-        LargeInteger        int (must be 4-byte unsigned largeInteger)
-        String              char *
-        Symbol              char *
-        Character           int
-        ExternalBytes       char *
-        ExternalAddress     char *
-        ExternalFunction    char *
-        FloatArray          float *
-        DoubleArray         double *
-        ByteArray           char *
-        ShortFloat          float
-        true                1
-        false               0
+	ST class            C argument
+	------------------------------
+	SmallInteger        int
+	LargeInteger        int (must be 4-byte unsigned largeInteger)
+	String              char *
+	Symbol              char *
+	Character           int
+	ExternalBytes       char *
+	ExternalAddress     char *
+	ExternalFunction    char *
+	FloatArray          float *
+	DoubleArray         double *
+	ByteArray           char *
+	ShortFloat          float
+	true                1
+	false               0
 
     The returned value is converted to an unsigned integer (smallInteger or largeInteger).
 
@@ -191,11 +191,11 @@
       general use. For now, use inline C-code.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        ExternalAddress ExternalBytes
-        ( how to write primitive code :html: programming/primitive.html )
+	ExternalAddress ExternalBytes
+	( how to write primitive code :html: programming/primitive.html )
 "
 !
 
@@ -306,7 +306,7 @@
     int (* func)();
 
     called = false;
-    if (__isSmallInteger(nr) && __isArray(argArray)) {
+    if (__isSmallInteger(nr) && __isArrayLike(argArray)) {
 	int nargs = __arraySize(argArray);
 	int functionNr;
 
@@ -424,7 +424,7 @@
 !ExternalFunction methodsFor:'accessing'!
 
 moduleHandle
-    "return the function's moduleHandle 
+    "return the function's moduleHandle
      (nil if not loaded dynamically)"
 
     ^ moduleHandle
@@ -567,7 +567,7 @@
     INT convertST_to_C();
 
     func = (LINTFUNC) __INST(code_);
-    if (func && __isArray(argArray)) {
+    if (func && __isArrayLike(argArray)) {
 	int n = __arraySize(argArray);
 	int i;
 
@@ -801,7 +801,7 @@
     INT convertST_to_C();
 
     func = (LINTFUNC) __INST(code_);
-    if (func && __isArray(argArray)) {
+    if (func && __isArrayLike(argArray)) {
 	int n = __arraySize(argArray);
 	int i;
 
@@ -948,7 +948,7 @@
     aStream nextPutAll:self class name; nextPutAll:'(name: ''';
 	    nextPutAll:name; nextPutAll:''' address: '.
 
-    addr := self code.
+    addr := self getCode.
     addr isNil ifTrue:[
 	aStream nextPutAll:'** unloaded **'
     ] ifFalse:[