added more code to ffi

This commit is contained in:
hyunghwan.chung
2017-01-11 15:33:03 +00:00
parent f23486468d
commit d130ec02ec
5 changed files with 259 additions and 206 deletions

View File

@ -88,8 +88,9 @@ class MyObject(Object)
(ffi isError)
ifTrue: [System logNl: 'cannot open libc.so' ]
ifFalse: [
(ffi call: #getpid signature: 'i' arguments: nil) dump.
(ffi call: #getpid signature: ')i' arguments: nil) dump.
(ffi call: #printf signature: 's|iis)i' arguments: #(S'A=>%d B=>%d Hello, world %s\n' 1 2 'fly away')) dump.
ffi close.
]
}
}
}

View File

@ -242,4 +242,4 @@ extend MyObject
System logNl: JJJ.
System logNl: -200 asString.
}
}
}