On 19.04.2010, at 10:19, Duncan Gibson wrote:
> Ian:
>> I was going to say that the wchar_t thing was likely to give us
>> problems on win32, but I see Albrecht already got there.
>
> Yes, I didn't know whether to go for the typedef, or the #define.
> As the scope of the latter is usually cited as one of the big
> deficiencies of C/C++, I thought the typedef would be better.
> It would appear not.

In general, typedef would be better, IMHO, but here it appears that
we don't have a choice, because we would have to override another
typedef that has been defined before. [ BTW.: Is there a way to
"undefine" a typedef ? ]

In fact, we're not changing the typedef, but we're "changing" MK's
code to use unsigned instead of wchar_t, thus making the typedef
irrelevant.

That said, this is IMHO a hack that doesn't make the code transparent
for readers: who would know that mk_wcwidth.c is only included in
another c file, and that *this* file defines wchar_t to be something
completely different, if he sees only mk_wcwidth.c ?

Thus, I agree with Ian: since we change it anyway, we should probably
do it the clean way and change the code directly, or add the #define
in mk_wcwidth.c at least.

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to