X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/928c6b8da5a3677aaaf33976a7d921a1498a61df..96e3b08533ea7fc6bd4b4de58849da0dec72411c:/src/parse.y diff --git a/src/parse.y b/src/parse.y index e6600bf..7588b9d 100644 --- a/src/parse.y +++ b/src/parse.y @@ -501,7 +501,7 @@ property_link_and_export (Node *node) 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); " @@ -1007,7 +1007,7 @@ argument: ARGUMENT flags argtype TOKEN export TOKEN '{' CCODE TOKEN '{' CCODE '; char *get, *set = NULL; Variable *var; Type *type; - char *root; + const char *root; if(strcmp($6, "link")!=0 && strcmp($6, "stringlink")!=0 && @@ -1024,15 +1024,16 @@ argument: ARGUMENT flags argtype TOKEN export TOKEN '{' CCODE TOKEN '{' CCODE '; type = pop_type(); var = find_var_or_die($4, $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, $1, _("Self aliases needed when autolinking to a classwide member")); - } else + } else { root = "self"; + } if(strcmp($6, "link")==0) { set = g_strdup_printf("%s->%s = ARG;", @@ -1704,8 +1705,8 @@ returnvals: TOKEN retcode { retcode: numtok { $$ = $1; } | '{' CCODE { - $$ = ($3)->str; - g_string_free($3, FALSE); + $$ = ($2)->str; + g_string_free($2, FALSE); } ;