Skip to content

Instantly share code, notes, and snippets.

@W-Net-AI
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save W-Net-AI/c8659901223c87097476 to your computer and use it in GitHub Desktop.
Save W-Net-AI/c8659901223c87097476 to your computer and use it in GitHub Desktop.
I have a setf version of the @@@ method in this macro. How would I go about calling it inside the macro.
The way I call it is (setf (@@@ object index) val).
(defmacro @ (object &optional i j)
"CFFI:MEM-AREF macro with C-POINTER reader."
(if (keywordp i)
`(mem-aref (resolve-pointer ,object) ,i (or ,j 0))
`(@@@ ,object ,i ,j)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment