Aldo Calpini <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch wrote:
> > 1) ICU should be optional
> >
> > If configured --without-icu the Makefile shouldn't contain ICU stuff,
> > and function calls to ICU (mainly in string_primitives) should be
> > wrapped inside #if PARROT_HAS_ICU.
> I'm gonna take this one (unless Steven Schubiger is already working on it).
Great, thanks.
> just as a generic hint, what should the #else (eg when PARROT_HAS_ICU is
> not defined) do?
The opcodes, I've implemented, call the interface functions
Parrot_string_is_xxx, which take a string and an offset. ASCII and
iso-8859-1 can be handled by the internal functions. For unicode strings
the functions in charset/unicode.c should eventually call into unicode
library functions, that can be ICU or any other lib, we have an
interface for.
The current Parrot_char_is_xx functions are misnamed. These are ICU
interface functions. We should eventually rename string_primitives.c to
string_icu.c - I think.
We have:
opcodes -> interface -> implementation
Parrot_string_is_xxxx charset/*.c
The functions in charset/unicode.c then should call ICU interface
functions or whatever, if available.
> a) consider everything ASCII and use the corresponding stdlib function
> b) always return NULL (or some approximation of NULL)
> c) complain to STDERR about ICU not being there
> d) coredump
e) throw a real_exception
> cheers,
> Aldo
leo