On Mon, Aug 04, 2014 at 04:45:46PM +0200, Thomas Bany wrote:
self nbCall: #( void propagateTLE(orbit_t orbit, NBExternalAddress
secondSince, NBExternalAddress out, size_t nbEpoch) )
But it feels like I'm cheating my way trough, by pretty much avoiding any type check. Any clue as to why the typecheck of NB is refusing to call my function ?
I'm not sure if this addresses (heh) your issue, but in NBSQLite3, I do what Punqlite does: NBSQLite3FFI class>>initializeTypeMap TypeMap := Dictionary newFromPairs: #( sqlite3 NBExternalObject sqlite3_stmt NBExternalObject sqlite_int64 NBInt64 ) NBSQLite3FFI class>>nbBindingOf: aTypeName ^ TypeMap at: aTypeName ifAbsent: [ super nbBindingOf: aTypeName ] NBSQLite3FFI>>apiOpen: filename via: handle "int sqlite3_open(const char*, sqlite3**)" <primitive: #primitiveNativeCall module: #NativeBoostPlugin error: errorCode> ^ self nbCall: #(int sqlite3_open (String filename, sqlite3* handle)) module: self library "handle" is the out parameter in sqlite3_open(). NBSQLite3 is at http://ss3.gemtalksystems.com/ss/NBSQLite3. Punqlite is on Smalltalk Hub. -- Pierce Ng http://www.samadhiweb.com/blog/