From: Sam S. <sd...@po...> - 2006-09-15 17:31:35
|
thanks for your bug report. please file a new self-contained bug report with a reproducible test case at http://sourceforge.net/tracker/?func=add&group_id=1355&atid=101355 you might also want to look at http://clisp.cons.org/impnotes/faq.html#faq-help http://clisp.cons.org/impnotes/clisp.html#bugs root wrote: > I seem to have run into a bug in clisp. > > I have a function that converts an string to a byte array. > I hand it a string of hex characters and these are converted > into byte hex strings. > > (defun string-to-byte-array (bytestring) > (let (stack result) > (do ((p 0)) > ((>= p (length bytestring)) nil) > (multiple-value-setq (m n) > (parse-integer bytestring :start p :radix 16 :junk-allowed t)) > (when m (push m stack)) > (setf p n)) > (setq result > (make-array (length stack) :element-type 'unsigned-byte > :initial-contents (nreverse stack))) > (format t "string-to-byte-array ~a ~a ~a~%" (type-of result) > (length bytestring) (length result)) > result)) > > This works fine for small strings. However I have a string that > is roughly 92000 bytes it creates a simple-vector of roughly 30000 bytes. > > The actual output of the format function is: > > string-to-byte-array (SIMPLE-VECTOR 30720) 92159 30720 > > I cannot use either svref or aref on the result because CLISP > complains that the result is not a SIMPLE-VECTOR. > > t |