if (prop->extra_gtktype != NULL) {
cast = remove_sep (prop->extra_gtktype);
} else {
- cast = "void";
+ cast = g_strdup ("void");
}
set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
"%s->%s = (%s *)g_value_dup_object (VAL); "
root, prop->name,
prop->extra_gtktype,
root, prop->name);
- get = g_strdup_printf("g_value_set_object (VAL, %s->%s);",
+ get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
root, prop->name);
} else {
char *set_func;
char *get, *set = NULL;
Variable *var;
Type *type;
- char *root;
+ const char *root;
if(strcmp($<id>6, "link")!=0 &&
strcmp($<id>6, "stringlink")!=0 &&
type = pop_type();
var = find_var_or_die($<id>4, $<line>1);
- if(var->scope == PRIVATE_SCOPE)
+ if(var->scope == PRIVATE_SCOPE) {
root = "self->_priv";
- else if(var->scope == CLASS_SCOPE) {
+ } else if(var->scope == CLASS_SCOPE) {
root = "SELF_GET_CLASS(self)";
if(no_self_alias)
error_print(GOB_ERROR, $<line>1,
_("Self aliases needed when autolinking to a classwide member"));
- } else
+ } else {
root = "self";
+ }
if(strcmp($<id>6, "link")==0) {
set = g_strdup_printf("%s->%s = ARG;",
retcode: numtok { $<id>$ = $<id>1; }
| '{' CCODE {
- $<id>$ = ($<cbuf>3)->str;
- g_string_free($<cbuf>3, FALSE);
+ $<id>$ = ($<cbuf>2)->str;
+ g_string_free($<cbuf>2, FALSE);
}
;