What is the difference between these two cffi functions? The fine manual is rather terse about this and I haven't managed to make them do something different yet.
-a
The mem-aref function is similar to mem-ref but will automatically calculate the offset from an index.
(defun mem-aref (ptr type &optional (index 0))
"Like MEM-REF except for accessing 1d arrays."
(mem-ref ptr type (* index (foreign-type-size type))))
Users browsing this forum: No registered users and 5 guests