Update of /cvsroot/sbcl/sbcl/contrib/sb-bsd-sockets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29837/contrib/sb-bsd-sockets
Modified Files:
sockets.lisp
Log Message:
0.8.12.51:
Make socket-receive allocate a buffer if it's passed a length arg.
Reported on CLL by Miguel Arroz; I removed that bit of code in .10
and forgot to put it back in.
Index: sockets.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/contrib/sb-bsd-sockets/sockets.lisp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sockets.lisp 31 May 2004 20:01:09 -0000 1.9
+++ sockets.lisp 22 Jul 2004 12:08:00 -0000 1.10
@@ -173,6 +173,8 @@
(error "Must supply at least one of BUFFER or LENGTH"))
(unless length
(setf length (length buffer)))
+ (unless buffer
+ (setf buffer (make-array length :element-type element-type)))
(let ((copy-buffer (sb-alien:make-alien (array sb-alien:unsigned 1) length)))
(unwind-protect
(sb-alien:with-alien ((sa-len (array (sb-alien:unsigned 32) 2)))
|