]> git.draconx.ca Git - gob-dx.git/blobdiff - src/parse.y
Release 2.0.3
[gob-dx.git] / src / parse.y
index e6600bf5538b48e749206a78bbd69a340507b752..7588b9d252131bfe1eb4b0f8bc464de469cc4f6a 100644 (file)
@@ -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($<id>6, "link")!=0 &&
                           strcmp($<id>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($<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;",
@@ -1704,8 +1705,8 @@ returnvals:       TOKEN retcode           {
 
 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);
                                        }
        ;