Compiling errors on F11 64-bit; question on sending in patch files

J. Alex Aycinena alex.aycinena at gmail.com
Fri Jul 24 17:10:57 EDT 2009


Christian,

2009/7/24 Christian Stimming <stimming at tuhh.de>:
> Dear Alex,
>
> your patch looks very good! I've committed this to SVN now (unfortunately I
> missed 2.3.3).

Thanks a lot.

>
> I've split the patch in two; one with the type changes, which are likely to
> not introduce any problems, and another patch with the newly added casts. By
> the way, where does BAD_CAST come from? I didn't know it and I didn't see a
> declaration anywhere. I only saw this already being used a lot.

Good idea. BAD_CAST, on my system, comes from
'/usr/include/libxml2/libxml/xmlstring.h' where type 'xmlChar' is also
defined. It says:

<Begin quote>
/**
 * xmlChar:
 *
 * This is a basic byte in an UTF-8 encoded string.
 * It's unsigned allowing to pinpoint case where char * are assigned
 * to xmlChar * (possibly making serialization back impossible).
 */
typedef unsigned char xmlChar;

/**
 * BAD_CAST:
 *
 * Macro to cast a string to an xmlChar * when one know its safe.
 */
#define BAD_CAST (xmlChar *)
<End quote>

I don't think 'serialization back' is an issue in any of the cases
used in these patches.

>
> And this whole issue with signed and unsigned chars in strings is a big mess
> of C. A (string) character should be a character and not having any
> signedness, but well, we have to live with the language as it is.
>

I am puzzled by the idea of signed char strings, or signed chars, for
that matter.

> Thanks a lot for your contribution!
>
> Christian
>

I'm also continuing work on enhancing some of the income tax features.
Should I continue to send patches in to you for this work? Or would it
be possible to get direct access to the repository? Please let me
know.

Thanks,

Alex


More information about the gnucash-devel mailing list