+ g_list_free($<list>2);
+ yyerror(_("parse error"));
+ YYERROR;
+ }
+
+ type = pop_type();
+
+ var = find_var_or_die($<id>4, $<line>1);
+ if(var->scope == PRIVATE_SCOPE)
+ root = "self->_priv";
+ else if(var->scope == CLASS_SCOPE) {
+ root = "SELF_GET_CLASS(self)";
+ if(no_self_alias)
+ print_error(FALSE,
+ _("Self aliases needed when autolinking to a classwide member"),
+ $<line>1);
+ } else
+ root = "self";
+
+ if(strcmp($<id>5, "link")==0) {
+ set = g_strdup_printf("%s->%s = ARG;",
+ root, $<id>4);
+ } else if(strcmp($<id>5, "stringlink")==0) {
+ set = g_strdup_printf("g_free(%s->%s); "
+ "%s->%s = g_strdup(ARG);",
+ root, $<id>4,
+ root, $<id>4);
+ } else if(strcmp($<id>5, "objectlink")==0) {
+ set = g_strdup_printf(
+ "if(%s->%s) "
+ "gtk_object_unref(GTK_OBJECT(%s->%s)); "
+ "%s->%s = ARG; "
+ "if(%s->%s) "
+ "gtk_object_ref(GTK_OBJECT(%s->%s));",
+ root, $<id>4,
+ root, $<id>4,
+ root, $<id>4,
+ root, $<id>4,
+ root, $<id>4);
+ } else {
+ g_assert_not_reached();
+ }
+
+ if(strcmp($<id>5, "stringlink")==0) {
+ get = g_strdup_printf("ARG = g_strdup(%s->%s);", root, $<id>4);
+ } else
+ /* For everything else, get is just straight assignment */
+ get = g_strdup_printf("ARG = %s->%s;", root, $<id>4);
+
+ g_free($<id>5);
+
+
+ if(!type)
+ type = copy_type(var->vtype);
+
+ node = new_argument($<id>3, type, $<list>2,
+ $<id>4, get, $<line>1,
+ set, $<line>1, $<line>1);
+ class_nodes = g_list_append(class_nodes,node);
+ }
+ ;
+
+argtype: TOKEN '(' TOKEN type ')' {
+ if(strcmp($<id>3,"type")!=0) {
+ g_free($<id>1);
+ g_free($<id>3);