This commit is contained in:
Dan 2008-05-21 12:18:47 -07:00
parent 26eb67f494
commit e92a636ae8
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
`(let ,(loop for n in names collect `(,n (gensym)))
,@body))
(defmacro only-once ((&rest names) &body body)
(defmacro once-only ((&rest names) &body body)
(let ((gensyms (loop for n in names collect (gensym))))
`(let (,@(loop for g in gensyms collect `(,g (gensym))))
`(let (,,@(loop for g in gensyms for n in names collect ``(,,g ,,n)))

View File

@ -32,10 +32,10 @@
;(if-timeout (timeout (format t "socket-receive timed out after ~A seconds.~%" timeout) (force-output) nil)
(defun tcp-read (socket &key (timeout 10))
(defun tcp-read (socket)
(when socket
(let ((len (parse-integer (tcp-read-raw socket :maxsize 4 :timeout timeout))))
(tcp-read-raw socket :maxsize len :timeout timeout))))
(let ((len (parse-integer (tcp-read-raw socket :maxsize 4 ))))
(tcp-read-raw socket :maxsize len))))

View File

@ -1,6 +1,6 @@
(defclass class_a ()
((a
:initarg a
:initarg :a
:initform (make-array 10 :initial-element 0)
:accessor a)))