Use a hash table keyed by foreign function name to save CIF
Save the libffi "CIF" (foreign structure with information prepared about function) in a hash table keyed by the foreign function name; if a function is in the hash table, it is retrieved on call to #'prepare-function, otherwise it is generated, saved in the table, and returned. Information may be removed from the table with #'unprepare-function. Start writing #'callable-function which will generate a lambda that can be called on Lisp arguments and calls #'call with the CIF and the arguments.
parent
f0235fb4
Please register or sign in to comment