[Openmcl-devel] make-heap-buffer question

Cyrus Harmon ch-openmcl at bobobeach.com
Mon Sep 20 03:38:28 UTC 2004


So I'm not sure exactly how to use the make-heap-buffer, 
make-heap-ivector stuff, or why it's in streams, for that matter, but 
this seems a bit odd:


(multiple-value-bind (buf p)
     (ccl::make-heap-buffer '(unsigned-byte 32) 256)
   (print (array-dimensions buf))
   (setf (aref buf 0) #x7f7f7f7f)
   (setf (aref buf 1) #xaabbccdd)
   (setf (aref buf 1023) #xdeadbeef)
   (let ((*print-base* 16))
     (print (aref buf 0))
     (print (aref buf 1))
     (print (aref buf 1023)))
   (print p))

gives the following results:

(1024)
7F7F7F7F
AABBCCDD
DEADBEEF
#<A Mac Pointer #x10A2CC>


I can understand buf beingg 1024 _bytes_ (in the normal 8-bit sense) 
long, but it looks to me like it's 1024 unsigned-byte 32's long. Is 
this a bug or am I missing something?

Thanks,

Cyrus




More information about the Openmcl-devel mailing list