Skip to content

Instantly share code, notes, and snippets.

@llibra
Created March 23, 2012 02:47
Show Gist options
  • Save llibra/2166352 to your computer and use it in GitHub Desktop.
Save llibra/2166352 to your computer and use it in GitHub Desktop.
cffi:w-f-o
(cffi:with-foreign-object (p :pointer)
(print (cffi:mem-ref p :pointer))
(setf (cffi:mem-ref p :pointer) (cffi:null-pointer))
(print (cffi:mem-ref p :pointer))
(print (cffi:pointer-address p)))
;-> #<A Foreign Pointer #x36>
; #<A Null Foreign Pointer>
; 37879600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment