/* GOB C Preprocessor
* Copyright (C) 1999-2000 the Free Software Foundation.
- * Copyright (C) 2001 George Lebl
+ * Copyright (C) 2000 Eazel, Inc.
+ * Copyright (C) 2001-2004 George (Jiri) Lebl
*
* Author: George Lebl
*
extern int ccode_line;
extern int line_no;
+extern gboolean for_cpp;
extern char *yytext;
get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
g_strdown (get_func);
- if (strcmp (prop->gtktype, "FLAGS") == 0) {
- setcast = "(guint) ";
- getcast = to_free =
- get_prop_enum_flag_cast (prop);
- } else if (strcmp (prop->gtktype, "ENUM") == 0) {
- setcast = "(gint) ";
- getcast = to_free =
- get_prop_enum_flag_cast (prop);
+ if (for_cpp) {
+ if (strcmp (prop->gtktype, "FLAGS") == 0) {
+ setcast = "(guint) ";
+ getcast = to_free =
+ get_prop_enum_flag_cast (prop);
+ } else if (strcmp (prop->gtktype, "ENUM") == 0) {
+ setcast = "(gint) ";
+ getcast = to_free =
+ get_prop_enum_flag_cast (prop);
+ }
}
set = g_strdup_printf("%s->%s = %s%s (VAL);",