Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make CFFI happy with structs.

  • Loading branch information...
commit cb4e78f1da0fcceb41e5ae591ff969bc07bca088 1 parent b09c0d9
@stassats authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  inotify.asd
  2. +2 −2 inotify.lisp
View
2  inotify.asd
@@ -5,6 +5,8 @@
(asdf:defsystem #:inotify
:depends-on (cffi iolib)
+ :license "Public Domain"
+ :description "Interface to linux inotify(7)"
:serial t
:components ((:file "packages")
(cffi-grovel:grovel-file "grovel")
View
4 inotify.lisp
@@ -121,14 +121,14 @@
(defun read-event (inotify buffer)
(with-foreign-slots ((watch mask cookie name-length)
- buffer inotify-event)
+ buffer (:struct inotify-event))
(let ((event (make-event :watch (find-watch inotify watch)
:mask mask
:cookie cookie)))
(unless (zerop name-length)
(setf (event-name event)
(foreign-string-to-lisp
- (foreign-slot-pointer buffer 'inotify-event 'name)
+ (foreign-slot-pointer buffer '(:struct inotify-event) 'name)
:max-chars name-length)))
(values event
(+ +event-size+ name-length)))))
Please sign in to comment.
Something went wrong with that request. Please try again.