added MOO_IN_SMPTR_RANGE(), MOO_SMPTR_TO_OOP(), MOO_OOP_TO_SMPTR().

refactored ffi a bit more
This commit is contained in:
hyunghwan.chung
2017-01-10 13:56:19 +00:00
parent faf6ca28e5
commit 1612143499
9 changed files with 132 additions and 50 deletions

View File

@ -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)
}
}