[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[pi8] node-ffi API

The result of evaluating
JS @> (self require: #ffi)
must be
{
 CIF: (function CIF(rtype, types, abi) {...});
 CIF_var: (function CIF_var(rtype, types, numFixedArgs, abi) {...});
 Callback: (function Callback(retType, argTypes, abi, func) {...});
 DynamicLibrary: (function DynamicLibrary(path, mode) {...});
 FFI_BAD_ABI: 2;
 FFI_BAD_TYPEDEF: 1;
 FFI_DEFAULT_ABI: 2;
 FFI_FIRST_ABI: 0;
 FFI_LAST_ABI: 3;
 FFI_OK: 0;
 FFI_SYSV: 1;
 FFI_TYPE: ([StructType]{...});
 FFI_TYPES: [object Object];
 FFI_VFP: 2;
 ForeignFunction: (function ForeignFunction(funcPtr, returnType, argTypes, abi) {...});
 Function: (function Function(retType, argTypes, abi) {...});
 HAS_OBJC: false;
 LIB_EXT: '.so';
 Library: (function Library(libfile, funcs, lib) {...});
 RTLD_DEFAULT: ;
 RTLD_GLOBAL: 256;
 RTLD_LAZY: 1;
 RTLD_LOCAL: 0;
 RTLD_NEXT: ;
 RTLD_NODELETE: 4096;
 RTLD_NOLOAD: 4;
 RTLD_NOW: 2;
 VariadicForeignFunction: (function VariadicForeignFunction(funcPtr, returnType, fixedArgTypes, abi) {...});
 errno: (function () {...});
 ffiType: (function Type(type) {...});
 types: [object Object];
 version: '3.0.11';
}

The result of evaluating
JS @> ((self require: #ffi) basicAt: #FFI_TYPES)
must be
{
 char: ;
 double: ;
 float: ;
 int: ;
 int16: ;
 int32: ;
 int64: ;
 int8: ;
 longlong: ;
 pointer: ;
 short: ;
 uchar: ;
 uint: ;
 uint16: ;
 uint32: ;
 uint64: ;
 uint8: ;
 ulonglong: ;
 ushort: ;
 void: ;
}