Skip to content

Instantly share code, notes, and snippets.

@snmsts
Created January 25, 2015 15:45
Show Gist options
  • Save snmsts/5bb76cdf5414e1ed8f3d to your computer and use it in GitHub Desktop.
Save snmsts/5bb76cdf5414e1ed8f3d to your computer and use it in GitHub Desktop.
cffi-grovel-test
(ql:quickload :cffi-grovel)
(defparameter *pwd* (make-pathname :name nil :type nil :defaults *load-pathname*))
(defpackage :hoge.ffi)
(with-open-file (out (merge-pathnames "tmp.lisp" *pwd*)
:direction :output
:if-does-not-exist :create
:if-exists :supersede)
(format out "~{~S~%~}" '((in-package :hoge.ffi)
(define "____hoge___" "sizeof(int)")
(constant (+what+ "____hoge___")))))
(load (cffi-grovel:process-grovel-file (merge-pathnames "tmp.lisp" *pwd*)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment