author | Claus Gittinger <cg@exept.de> |
Tue, 25 Apr 2006 17:57:26 +0200 | |
changeset 9328 | e30967f7ce5f |
parent 9327 | 9c15276d61e3 |
child 9329 | d1dba8a3752b |
permissions | -rw-r--r-- |
8728 | 1 |
" |
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
9322 | 3 |
All Rights Reserved |
8728 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
8533 | 13 |
"{ Package: 'stx:libbasic' }" |
14 |
||
15 |
ExternalFunction subclass:#ExternalLibraryFunction |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
16 |
instanceVariableNames:'flags moduleName callType returnType argumentTypes' |
8533 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'System-Support' |
|
20 |
! |
|
21 |
||
9322 | 22 |
!ExternalLibraryFunction primitiveDefinitions! |
23 |
%{ |
|
24 |
# include <ffi.h> |
|
25 |
||
26 |
# define MAX_ARGS 128 |
|
27 |
||
28 |
%} |
|
29 |
! ! |
|
30 |
||
8728 | 31 |
!ExternalLibraryFunction class methodsFor:'documentation'! |
32 |
||
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
9322 | 36 |
All Rights Reserved |
8728 | 37 |
|
38 |
This software is furnished under a license and may be used |
|
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
9322 | 45 |
! |
46 |
||
47 |
example |
|
48 |
" |
|
49 |
|f| |
|
50 |
||
51 |
f := ExternalLibraryFunction new. |
|
52 |
f name:'MessageBeep' |
|
53 |
module:'user32.dll' |
|
54 |
callType:#WINAPI |
|
55 |
returnType:#boolean |
|
56 |
argumentTypes:#(uint). |
|
57 |
||
58 |
f invokeWith:1. |
|
59 |
" |
|
8728 | 60 |
! ! |
8533 | 61 |
|
8550 | 62 |
!ExternalLibraryFunction class methodsFor:'instance creation'! |
63 |
||
9322 | 64 |
name:functionName module:moduleName callType:callType |
65 |
returnType:returnType argumentTypes:argTypes |
|
8550 | 66 |
^ self new |
9322 | 67 |
name:functionName module:moduleName callType:callType |
68 |
returnType:returnType argumentTypes:argTypes |
|
8550 | 69 |
! ! |
70 |
||
9321 | 71 |
!ExternalLibraryFunction class methodsFor:'constants'! |
72 |
||
73 |
callTypeAPI |
|
74 |
^ #callTypeAPI |
|
75 |
! |
|
76 |
||
77 |
callTypeC |
|
78 |
^ #callTypeC |
|
79 |
! |
|
80 |
||
81 |
callTypeCDecl |
|
82 |
^ #callTypeCDecl |
|
83 |
! |
|
84 |
||
85 |
callTypeOLE |
|
86 |
^ #callTypeOLE |
|
87 |
! ! |
|
88 |
||
89 |
!ExternalLibraryFunction methodsFor:'accessing'! |
|
90 |
||
91 |
argumentTypes |
|
92 |
^ argumentTypes |
|
93 |
! ! |
|
94 |
||
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
95 |
!ExternalLibraryFunction methodsFor:'invoking'! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
96 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
97 |
invoke |
9321 | 98 |
self hasCode ifFalse:[ |
9322 | 99 |
self prepareInvoke. |
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
100 |
]. |
9321 | 101 |
^ self invokeFFIWithArguments:#() |
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
102 |
! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
103 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
104 |
invokeWith:arg |
9321 | 105 |
self hasCode ifFalse:[ |
9322 | 106 |
self prepareInvoke. |
9321 | 107 |
]. |
108 |
^ self invokeFFIWithArguments:(Array with:arg) |
|
109 |
! |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
110 |
|
9321 | 111 |
invokeWith:arg1 with:arg2 |
112 |
self hasCode ifFalse:[ |
|
9322 | 113 |
self prepareInvoke. |
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
114 |
]. |
9321 | 115 |
^ self invokeFFIWithArguments:(Array with:arg1 with:arg2) |
116 |
! |
|
117 |
||
118 |
invokeWith:arg1 with:arg2 with:arg3 |
|
119 |
self hasCode ifFalse:[ |
|
9322 | 120 |
self prepareInvoke. |
9321 | 121 |
]. |
122 |
^ self invokeFFIWithArguments:(Array with:arg1 with:arg2 with:arg3) |
|
123 |
! |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
124 |
|
9321 | 125 |
invokeWith:arg1 with:arg2 with:arg3 with:arg4 |
126 |
self hasCode ifFalse:[ |
|
9322 | 127 |
self prepareInvoke. |
9321 | 128 |
]. |
129 |
^ self invokeFFIWithArguments:(Array with:arg1 with:arg2 with:arg3 with:arg4) |
|
130 |
! |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
131 |
|
9321 | 132 |
invokeWithArguments:argArray |
133 |
self hasCode ifFalse:[ |
|
9322 | 134 |
self prepareInvoke. |
9321 | 135 |
]. |
136 |
^ self invokeFFIWithArguments:argArray |
|
137 |
! ! |
|
138 |
||
139 |
!ExternalLibraryFunction methodsFor:'printing'! |
|
140 |
||
141 |
printOn:aStream |
|
142 |
aStream nextPutAll:'<'. |
|
143 |
callType printOn:aStream. |
|
144 |
aStream nextPutAll:' '. |
|
145 |
name printOn:aStream. |
|
146 |
aStream nextPutAll:' module:'. |
|
147 |
moduleName printOn:aStream. |
|
148 |
aStream nextPutAll:'>'. |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
149 |
! ! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
150 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
151 |
!ExternalLibraryFunction methodsFor:'private'! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
152 |
|
9321 | 153 |
invokeFFIWithArguments:arguments |
9322 | 154 |
|argTypeSymbols returnTypeSymbol failureCode| |
9321 | 155 |
|
156 |
argumentTypes notNil ifTrue:[ |
|
9322 | 157 |
argTypeSymbols := argumentTypes collect:[:argType | self ffiTypeSymbolForType:argType]. |
9321 | 158 |
]. |
9322 | 159 |
returnTypeSymbol := self ffiTypeSymbolForType:returnType. |
160 |
||
9324 | 161 |
%{ /* STACK: 32000 */ |
162 |
ffi_cif __cif; |
|
163 |
ffi_type *__argTypes[MAX_ARGS]; |
|
9328 | 164 |
ffi_type *__returnType = NULL; |
9322 | 165 |
union { |
166 |
int iVal; |
|
9324 | 167 |
} __argValues[MAX_ARGS]; |
168 |
void *__argValuePointers[MAX_ARGS]; |
|
169 |
int __numArgs; |
|
170 |
static int null = 0; |
|
9321 | 171 |
int i; |
9324 | 172 |
ffi_abi __callType = FFI_DEFAULT_ABI; |
9321 | 173 |
|
9328 | 174 |
printf("uint type2: %x\n", __get_ffi_type_uint()); |
175 |
||
9321 | 176 |
if (arguments == nil) { |
9324 | 177 |
__numArgs = 0; |
9322 | 178 |
if (argTypeSymbols != nil) { |
9324 | 179 |
if (! __isArray(argTypeSymbols) |
180 |
|| (__arraySize(argTypeSymbols) != __numArgs)) { |
|
181 |
failureCode = @symbol(ArgumentCountMismatch); |
|
182 |
goto error; |
|
183 |
} |
|
9321 | 184 |
} |
185 |
} else { |
|
9324 | 186 |
if (! __isArray(arguments) |
187 |
|| ! __isArray(argTypeSymbols) |
|
188 |
|| (__arraySize(argTypeSymbols) != (__numArgs = __arraySize(arguments)))) { |
|
189 |
failureCode = @symbol(ArgumentCountMismatch); |
|
190 |
goto error; |
|
191 |
} |
|
9321 | 192 |
} |
9324 | 193 |
if (__numArgs > MAX_ARGS) { |
9321 | 194 |
failureCode = @symbol(TooManyArguments); |
195 |
goto error; |
|
196 |
} |
|
9322 | 197 |
|
9328 | 198 |
if (returnTypeSymbol == @symbol(int)) { |
199 |
printf("ret int\n"); |
|
200 |
__returnType = __get_ffi_type_sint(); |
|
201 |
} else if (returnTypeSymbol == @symbol(uint)) { |
|
202 |
printf("ret uint\n"); |
|
203 |
__returnType = __get_ffi_type_uint(); |
|
204 |
} else if (returnTypeSymbol == @symbol(boolean)) { |
|
205 |
printf("ret boolean\n"); |
|
206 |
__returnType = __get_ffi_type_uint(); |
|
207 |
} else if (returnTypeSymbol == @symbol(void)) { |
|
208 |
printf("void\n"); |
|
209 |
__returnType = __get_ffi_type_void(); |
|
210 |
} else { |
|
211 |
failureCode = @symbol(UnknownReturnType); |
|
212 |
goto error; |
|
213 |
} |
|
214 |
||
215 |
for (i=0; i<__numArgs; i++) { |
|
9324 | 216 |
ffi_type *thisType; |
9322 | 217 |
void *argValuePtr; |
218 |
OBJ typeSymbol; |
|
9324 | 219 |
OBJ arg; |
9322 | 220 |
|
9328 | 221 |
printf("arg%d\n", i); |
222 |
typeSymbol = __ArrayInstPtr(argTypeSymbols)->a_element[i]; |
|
223 |
arg = __ArrayInstPtr(arguments)->a_element[i]; |
|
9324 | 224 |
|
9322 | 225 |
if (typeSymbol == @symbol(int)) { |
9328 | 226 |
thisType = __get_ffi_type_sint(); |
9324 | 227 |
if (__isSmallInteger(arg)) { |
228 |
__argValues[i].iVal = __intVal(arg); |
|
229 |
} else { |
|
230 |
__argValues[i].iVal = __signedLongIntVal(arg); |
|
231 |
if (__argValues[i].iVal == 0) { |
|
232 |
failureCode = @symbol(InvalidArgument); |
|
233 |
goto error; |
|
234 |
} |
|
235 |
} |
|
236 |
argValuePtr = &(__argValues[i].iVal); |
|
237 |
} else if (typeSymbol == @symbol(uint)) { |
|
9328 | 238 |
printf("uint\n"); |
239 |
thisType = __get_ffi_type_uint(); |
|
9324 | 240 |
|
241 |
if (__isSmallInteger(arg)) { |
|
242 |
__argValues[i].iVal = __intVal(arg); |
|
243 |
} else { |
|
244 |
__argValues[i].iVal = __unsignedLongIntVal(arg); |
|
245 |
if (__argValues[i].iVal == 0) { |
|
246 |
failureCode = @symbol(InvalidArgument); |
|
247 |
goto error; |
|
248 |
} |
|
249 |
} |
|
250 |
argValuePtr = &(__argValues[i].iVal); |
|
9322 | 251 |
} else if (typeSymbol == @symbol(void)) { |
9328 | 252 |
printf("void\n"); |
253 |
thisType = __get_ffi_type_void(); |
|
9322 | 254 |
argValuePtr = &null; |
9324 | 255 |
} else if (typeSymbol == @symbol(boolean)) { |
9328 | 256 |
printf("boolean\n"); |
257 |
thisType = __get_ffi_type_uint(); |
|
9324 | 258 |
|
259 |
if (arg == true) { |
|
260 |
__argValues[i].iVal = 1; |
|
261 |
} else if (arg == false) { |
|
262 |
__argValues[i].iVal = 0; |
|
263 |
} else if (__isSmallInteger(arg)) { |
|
264 |
__argValues[i].iVal = __intVal(arg); |
|
265 |
} else { |
|
266 |
__argValues[i].iVal = __unsignedLongIntVal(arg); |
|
267 |
if (__argValues[i].iVal == 0) { |
|
268 |
failureCode = @symbol(InvalidArgument); |
|
269 |
goto error; |
|
270 |
} |
|
271 |
} |
|
272 |
argValuePtr = &(__argValues[i].iVal); |
|
9322 | 273 |
} else { |
9328 | 274 |
failureCode = @symbol(UnknownArgumentType); |
9322 | 275 |
goto error; |
9321 | 276 |
} |
9322 | 277 |
|
9328 | 278 |
__argTypes[i] = thisType; |
279 |
__argValuePointers[i] = argValuePtr; |
|
280 |
printf("__argType[%d]: %x\n", i, thisType); |
|
9321 | 281 |
} |
282 |
||
9324 | 283 |
if (__INST(callType) == @symbol(callTypeC)) { |
284 |
__callType = FFI_DEFAULT_ABI; |
|
285 |
#ifdef WIN32 |
|
286 |
} else if (__INST(callType) == @symbol(callTypeAPI)) { |
|
287 |
__callType = FFI_STDCALL; |
|
288 |
} else if (__INST(callType) == @symbol(WINAPI)) { |
|
289 |
__callType = FFI_STDCALL; |
|
290 |
#endif /* WIN32 */ |
|
291 |
} else if (__INST(callType) == @symbol(callTypeCDecl)) { |
|
292 |
__callType = FFI_DEFAULT_ABI; |
|
293 |
} else { |
|
294 |
failureCode = @symbol(UnknownCallType); |
|
295 |
goto error; |
|
296 |
} |
|
297 |
||
9328 | 298 |
printf("return type: %x\n", __returnType); |
299 |
printf("return type size: %x\n", __returnType->size); |
|
300 |
printf("return type alignment: %x\n", __returnType->alignment); |
|
301 |
||
302 |
printf("arg type: %x\n", __argTypes[0]); |
|
303 |
printf("arg type size: %x\n", __argTypes[0]->size); |
|
304 |
printf("arg type alignment: %x\n", __argTypes[0]->alignment); |
|
305 |
||
9324 | 306 |
if (ffi_prep_cif(&__cif, __callType, __numArgs, __returnType, __argTypes) != FFI_OK) { |
307 |
failureCode = @symbol(FFIPrepareFailed); |
|
308 |
goto error; |
|
309 |
} |
|
310 |
||
311 |
||
9322 | 312 |
# if 0 |
313 |
/* Initialize the cif */ |
|
314 |
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, |
|
315 |
&ffi_type_sint64, args) == FFI_OK); |
|
316 |
||
9321 | 317 |
argtypes = (ffi_type **)C_alloca(sizeof(ffi_type *) * (n + 3)); |
318 |
argvalues = (void **)C_alloca(sizeof(void *) * (n + 3)); |
|
319 |
argtypes[ 0 ] = &ffi_type_pointer; |
|
320 |
argtypes[ 1 ] = &ffi_type_pointer; |
|
321 |
argtypes[ 2 ] = &ffi_type_pointer; |
|
322 |
c = n + 2; |
|
323 |
argvalues[ 0 ] = &c; |
|
324 |
argvalues[ 1 ] = &fn; |
|
325 |
argvalues[ 2 ] = &k; |
|
326 |
||
327 |
for(i = 0; i < n; ++i) { |
|
328 |
argtypes[ i + 3 ] = &ffi_type_pointer; |
|
329 |
argvalues[ i + 3 ] = C_temporary_stack_bottom - (i + 1); |
|
330 |
} |
|
331 |
||
332 |
C_temporary_stack = C_temporary_stack_bottom; |
|
333 |
status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, n + 3, &ffi_type_void, argtypes); |
|
334 |
assert(status == FFI_OK); |
|
335 |
ffi_call(&cif, (void *)C_block_item(fn, 0), NULL, argvalues); |
|
9322 | 336 |
# endif |
337 |
||
9321 | 338 |
error: ; |
9324 | 339 |
%}. |
340 |
failureCode notNil ifTrue:[ |
|
341 |
self primitiveFailed |
|
342 |
]. |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
343 |
! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
344 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
345 |
linkToModule |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
346 |
"link this function to the external module. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
347 |
I.e. retrieve the module handle and the code pointer." |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
348 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
349 |
|handle code| |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
350 |
|
9321 | 351 |
moduleName isNil ifTrue:[ |
9322 | 352 |
self error:'Missing moduleName'. |
9321 | 353 |
]. |
354 |
||
355 |
handle := ObjectFileLoader loadDynamicObject:moduleName. |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
356 |
handle isNil ifTrue:[ |
9322 | 357 |
self error:'Cannot load module: ', moduleName. |
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
358 |
]. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
359 |
moduleHandle := handle. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
360 |
code := moduleHandle getFunctionAddress:name into:self. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
361 |
code isNil ifTrue:[ |
9322 | 362 |
self error:'Missing function: ', name, ' in module: ', moduleName. |
9321 | 363 |
]. |
364 |
! |
|
365 |
||
366 |
prepareInvoke |
|
367 |
self hasCode ifFalse:[ |
|
9322 | 368 |
moduleHandle isNil ifTrue:[ |
369 |
self linkToModule. |
|
370 |
self setupFFI. |
|
371 |
]. |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
372 |
]. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
373 |
! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
374 |
|
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
375 |
setupFFI |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
376 |
"setup foreign function interface" |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
377 |
|
9321 | 378 |
"/ %{ |
379 |
"/ #if defined(WIN32) && defined(i386) |
|
380 |
"/ /* Have special code for this case - no need to use of ffi code. */ |
|
381 |
"/ #else |
|
9322 | 382 |
"/ if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ffi_type_uint, args)) |
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
383 |
! ! |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
384 |
|
8550 | 385 |
!ExternalLibraryFunction methodsFor:'private-accessing'! |
386 |
||
9327 | 387 |
ffiTypeSymbolForType:aType |
9322 | 388 |
|
389 |
"/ kludge for those who do not have the CType package... |
|
390 |
aType isSymbol ifTrue:[ ^ aType ]. |
|
9327 | 391 |
|
9322 | 392 |
CType isNil ifTrue:[ |
393 |
self error:'unknown type'. |
|
394 |
]. |
|
395 |
^ aType typeSymbol |
|
396 |
! |
|
397 |
||
398 |
name:functionName module:aModuleName callType:aCallType returnType:aReturnType argumentTypes:argTypes |
|
8891
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
399 |
name := functionName. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
400 |
moduleName := aModuleName. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
401 |
callType := aCallType. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
402 |
returnType := aReturnType. |
c30a030ff5ec
more FFI (foreign function interface) support - still incomplete
Stefan Vogel <sv@exept.de>
parents:
8728
diff
changeset
|
403 |
argumentTypes := argTypes. |
8550 | 404 |
! ! |
405 |
||
8533 | 406 |
!ExternalLibraryFunction class methodsFor:'documentation'! |
407 |
||
408 |
version |
|
9328 | 409 |
^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.9 2006-04-25 15:57:26 cg Exp $' |
8533 | 410 |
! ! |