What is the recommended way find to the byte order of the platform
using CFFI?  Currently I am using the following:

(defun native-byte-order-lsb-p ()
  (with-foreign-object (x :uint32)
    (setf (mem-ref x :uint32) 1)
    (= (mem-ref x :uint8) 1)))

but it looks like a nasty hack.

Tamas
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to