From kilian.sprotte at googlemail.com Sun Mar 4 15:28:31 2007 From: kilian.sprotte at googlemail.com (Kilian Sprotte) Date: Sun, 4 Mar 2007 16:28:31 +0100 Subject: [trivial-utf-8-devel] a little patch Message-ID: <1d26dc7e0703040728i4715a00ft66e614806cb4dc6e@mail.gmail.com> 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: From marijnh at gmail.com Mon Mar 5 16:49:11 2007 From: marijnh at gmail.com (Marijn Haverbeke) Date: Mon, 5 Mar 2007 17:49:11 +0100 Subject: [trivial-utf-8-devel] a little patch In-Reply-To: <1d26dc7e0703040728i4715a00ft66e614806cb4dc6e@mail.gmail.com> References: <1d26dc7e0703040728i4715a00ft66e614806cb4dc6e@mail.gmail.com> Message-ID: Hello Killian, Thanks for the fixes. I did indeed only test on SBCL and CLISP, so stuff like this was bound to slip by. They repo and tarballs on common-lisp.net have been updated with your patches. Cheers, Marijn