chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] utf8 egg and byte-* procedures


From: Alex Shinn
Subject: Re: [Chicken-users] utf8 egg and byte-* procedures
Date: Fri, 26 Mar 2010 09:06:06 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin)

Jeronimo Pellegrini <address@hidden> writes:

> It's fine until that point -- now the string-length procedure
> is utf8-aware. So that means the egg was loaded and the string
> manipulating procedures were redefined.
>
> But the egg documentation mentions that I can use the "byte-"
> prefix to get the old non-utf8 procedures (and explicitly mentions
> byte-string-length). Now, I suppose they're not visible (or bound)
> by default, because:

In Chicken 3 I provided a separate "byte-string" module
which you needed to import to get access to the renamed
"byte-" versions of the non-utf8 procedures.

In Chicken 4 this is no longer needed, since we have modules
with fine-grained control of importing.  So to get
byte-aware versions of the string procedures you can use:

(import (prefix byte-
                (only scheme string-ref string-set! string-length)))

and just add to the `only' list any other procedures you
need.

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]