pika-dev
[Top][All Lists]
Advanced

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

Re: [Pika-dev] Guile FFI: resizable vector problem


From: Andreas Rottmann
Subject: Re: [Pika-dev] Guile FFI: resizable vector problem
Date: Fri, 20 Feb 2004 14:30:16 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Tom Lord <address@hidden> writes:

>     > From: Andreas Rottmann <address@hidden>
>
>     > That also would solve the second feature macro I've in use so
>     > far: SCM_FEATURE_CHAR_UNICODE. If it isn't defined, the
>     > implementation is only guaranteed to support ASCII chars. I
>     > think the macros would come handy in the scm/tests, however,
>     > that way the test cases can be shared among all implementations.
>
> I'm not against the feature-macro idea.  It makes me a _little_
> nervous just because I don't like #ifdef'ed code -- but on the other
> hand, ASCII-only (or iso8859-*-only) optoins would be very winning
> things to provide.
>
In fact, there is no real need to #ifdef the code; something like the
following will work as well, since the API stays the same, it's just
that some usage of the API isn't supported:

#define SCM_FEATURE_CHAR_UNICODE 0 /* or 1, must be #defined always */

if (SCM_FEATURE_CHAR_UNICODE)
  do_unicode_tests ();

Regards, Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!




reply via email to

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