added MOO_IN_SMPTR_RANGE(), MOO_SMPTR_TO_OOP(), MOO_OOP_TO_SMPTR().
refactored ffi a bit more
This commit is contained in:
@ -1,5 +1,13 @@
|
||||
class(#byte) _FFI(Module) from 'ffi'
|
||||
{
|
||||
(*
|
||||
* the ffi module installs the following methods
|
||||
* method(#class) _newInstSize
|
||||
* method open: name
|
||||
* method close
|
||||
* method call
|
||||
* method call: func sig: sig with: args.
|
||||
*)
|
||||
}
|
||||
|
||||
class FFI(Object)
|
||||
@ -43,6 +51,8 @@ class FFI(Object)
|
||||
(f isError) ifTrue: [^f].
|
||||
self.funcs at: name put: f.
|
||||
].
|
||||
^self.ffi call: f sig: sig with: args
|
||||
|
||||
(*^self.ffi call: f sig: sig with: args*)
|
||||
^self.ffi call(f, sig, args)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user