FLI question
Before I go through the effort of going down a particular path with a C library, I was wondering if the following was possible. I'd basically like a FLI function to return multiple values based on an error return values from C (an integer), where 0 = no error and anything else is an error. If I can't then I'll just end up working the C library so that there's a get_last_error() function to return the error code and grab it as needed. I'm just at the design phase and if someone know the answer to this off the top of their head, then it'd just save me time trying it out. ;-) ;;;; -*- code -*- (defun error-values (err) "Returns 2 values: T/NIL for err==0 and the error code if NIL" (if (zerop err) t (values nil err))) (fli:define-c-typedef error-result (:wrapper :int :foreign-to-lisp error-values)) (fli:define-foreign-function (…) () :result-type error-result) Thanks! Jeff M.