Re: Bug in CONVERT-FROM-FOREIGN-STRING (patch included)
* Kevin Rosenberg <kevin@...>
| Vebjorn Ljosa wrote:
| > I have attached a patch, which introduces LENGTH as a second argument
| > to FAST-NATIVE-TO-STRING. LENGTH can be NIL, if which case the length
| > is determined by strlen() as before. I have only tested it on
| > LispWorks; I would appreciate it if someone could verify that the
| > patch also works on Allegro CL.
|
| The patch works fine with AllegroCL, but I did have to remove the
| comment characters on the type declaration.
Just so you know, LispWorks is not completely happy with that time
declaration. During compilation, it gives the warning
"Variable STR is declared type (SIMPLE-ARRAY (SIGNED-BYTE 8) (*)),
but is bound to a value of type SIMPLE-STRING"
and if SAFETY is more than 0, it fails at runtime with an error like
the following:
"In a call to SEQ::%SET-ACCESS-ARRAY: 102 is not of type BASE-CHAR."
When SAFETY is 0, it seems to work fine, however. I guess this is the
only way to avoid CODE-CHAR?
| I've uploaded version
| 1.4.4 with this change.
Thanks!
(Continue reading)