> I was working on better extended character support in the wordperfect > importer, and I ran into the following weirdness with UT_types.h: > > typedef unsigned int UT_UCS4Char; > typedef signed int UT_GrowBufElement; > > I want to have growbuf's of UT_UCS4Char.. but there's obviously a > signing issue here. Shouldn't UT_GrowBufElement be unsigned?
The grow buffer is used for other things than characters, such as character widths, which can be negative, and so it is better to be defined using the most generic, i.e., signed, integer type. When you use it with UT_UCS4Char, you just need to do explicit casting. Tomas
