Re: Another sketch of foreign-status abstraction in Common Lisp Lassi Kortela 14 Aug 2020 11:47 UTC

Oh, the output is:

(FOREIGN-STATUS-SET ST) => LIBCURL
(FOREIGN-STATUS-REF ST 'SET) => LIBCURL
(FOREIGN-STATUS-CODE ST) => 52
(FOREIGN-STATUS-REF ST 'CODE) => 52
(FOREIGN-STATUS-REF ST 'NAME) => CURLE_GOT_NOTHING
(FOREIGN-STATUS-REF ST 'MESSAGE) => "Message from curl"

(FOREIGN-STATUS-SET ST) => ERRNO
(FOREIGN-STATUS-REF ST 'SET) => ERRNO
(FOREIGN-STATUS-CODE ST) => 4
(FOREIGN-STATUS-REF ST 'CODE) => 4
(FOREIGN-STATUS-REF ST 'MESSAGE) => "Please implement strerror ^_^"
(FOREIGN-STATUS-REF ST 'FOREIGN-PROCEDURE) => READ