ExternalLibraryFunction.st
changeset 12449 ca958524b42f
parent 12436 92a968c9ca92
child 12450 c6d60bdca435
--- a/ExternalLibraryFunction.st	Wed Nov 04 17:25:51 2009 +0100
+++ b/ExternalLibraryFunction.st	Wed Nov 04 17:44:06 2009 +0100
@@ -576,8 +576,8 @@
 
 prepareInvoke
     (moduleHandle isNil or:[self hasCode not]) ifTrue:[
-	self linkToModule.
-	self adjustTypes.
+        self linkToModule.
+        self adjustTypes.
     ].
 ! !
 
@@ -585,9 +585,9 @@
 
 ffiTypeSymbolForType:aType
     "map type to one of the ffi-supported ones:
-	sint8, sint16, sint32, sint64
-	uint8, uint16, uint32, uint64
-	bool void handle
+        sint8, sint16, sint32, sint64
+        uint8, uint16, uint32, uint64
+        bool void handle
     "
 
     aType == #sint8           ifTrue:[^ aType ].
@@ -611,6 +611,7 @@
     aType == #int64           ifTrue:[^ #sint64 ].
     aType == #voidPointer     ifTrue:[^ #pointer ].
     aType == #uint8Pointer    ifTrue:[^ #pointer ].
+    aType == #voidPointerPointer  ifTrue:[^ #pointer ].
 
     aType == #short           ifTrue:[^ #sint16 ].
     aType == #long            ifTrue:[^ #long ].
@@ -639,12 +640,15 @@
     aType == #unsigned        ifTrue:[^ #uint ].
 
     (aType isString or:[aType isSymbol]) ifFalse:[
-	CType isNil ifTrue:[
-	    self error:'unknown type'.
-	].
-	^ aType typeSymbol.
+        CType isNil ifTrue:[
+            self error:'unknown type'.
+        ].
+        ^ aType typeSymbol.
     ].
 
+    (aType endsWith:'Pointer') ifTrue:[
+        ^ #pointer.
+    ].
     ^ aType
 
     "Modified: / 14-06-2007 / 17:21:42 / cg"
@@ -1391,11 +1395,11 @@
 !ExternalLibraryFunction class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.67 2009-11-04 16:10:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.68 2009-11-04 16:44:06 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.67 2009-11-04 16:10:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.68 2009-11-04 16:44:06 cg Exp $'
 ! !
 
 ExternalLibraryFunction initialize!