Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from esessoms/master

two really trivial changes
  • Loading branch information...
commit e9a10f0eeb50fb4cf2a1e94227812768394c2333 2 parents b10afe4 + ad10069
@galdor galdor authored
Showing with 7 additions and 7 deletions.
  1. +1 −1  src/packages.lisp
  2. +5 −5 src/zmq.lisp
  3. +1 −1  test/main.lisp
View
2  src/packages.lisp
@@ -19,7 +19,7 @@
:send :recv
:with-poll-items
- :poll-items-aref :do-poll-items :poll-item-event-signaled-p
+ :poll-items-aref :do-poll-items :poll-item-events-signaled-p
:poll
:stopwatch-start :stopwatch-stop :with-stopwatch
View
10 src/zmq.lisp
@@ -382,14 +382,14 @@ ITEMS."
(let ((,var (poll-items-aref ,items ,i)))
,@body))))
-(defun poll-item-event-signaled-p (poll-item event)
- "Return T if POLL-ITEM indicates that an event of type EVENT was detected
- for the underlying socket or file descriptor or NIL if no event occurred."
+(defun poll-item-events-signaled-p (poll-item &rest events)
+ "Return T if POLL-ITEM indicates that one or more of the listed EVENTS types was
+ detected for the underlying socket or file descriptor or NIL if no event occurred."
(/= (logand (foreign-slot-value poll-item 'pollitem 'revents)
- (foreign-bitfield-value 'event-types (list event))) 0))
+ (foreign-bitfield-value 'event-types events)) 0))
(defun poll (items nb-items timeout)
- "Poll ITEMS with a timeout of TIMEOUT seconds, -1 meaning no time
+ "Poll ITEMS with a timeout of TIMEOUT microseconds, -1 meaning no time
limit. Return the number of items with signaled events."
(call-ffi -1 '%poll items nb-items timeout))
View
2  test/main.lisp
@@ -153,7 +153,7 @@
((sub-socket :pollin))
(let ((nb-signaled-items (zmq:poll items nb-items -1)))
(is (= nb-signaled-items 1))
- (is-true (zmq:poll-item-event-signaled-p
+ (is-true (zmq:poll-item-events-signaled-p
(zmq:poll-items-aref items 0) :pollin))
(zmq:with-msg-init (msg)
(zmq:recv sub-socket msg)
Please sign in to comment.
Something went wrong with that request. Please try again.