[trivial-utf-8-devel] a little patch

Kilian Sprotte kilian.sprotte at googlemail.com
Sun Mar 4 15:28:31 UTC 2007


Hello,

while trying to run trivial-utf-8 on other implementations
(specifically lispworks) than sbcl, I noticed two problems that I am
providing a patch for.

The first one is that make-string can happen to use a base-char
instead of a character, so I added:

(make-string ... :element-type 'character)

The other one concerns the declaration (type fixnum byte-length
char-length) in read-utf-8-string. Since char-length and byte-length
can be not given, they default to NIL, which is not a fixnum. This
means that the test fails on other implementations, while on sbcl it
succeeds. Compiling the lib on sbcl with (safety 3) will make it
complain as well.

I am simply using the value -1 instead of NIL here. Maybe there is a
prettier way?

(I was thinking of adding a macrolet something like

(fixnum-given-p (fixnum)
  `(/= -1 ,fixnum))

but then I thought maybe its not worth it......)

Cheers,
  Kilian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trivial-utf-8.patch
Type: application/octet-stream
Size: 2905 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/trivial-utf-8-devel/attachments/20070304/abc2b16c/attachment.obj>


More information about the trivial-utf-8-devel mailing list