}
Node *
-new_method(int scope, int method, Type *mtype, char *otype, GList *gtktypes, char *id, GList *args, char *onerror, char *cbuf, int line_no, int ccode_line, gboolean vararg)
+new_method(int scope, int method, Type *mtype, char *otype,
+ GList *gtktypes, GList *flags, char *id, GList *args,
+ char *onerror, char *cbuf, int line_no, int ccode_line,
+ gboolean vararg)
{
Method *node = (Method *)g_new(Node,1);
node->type = METHOD_NODE;
node->mtype = mtype;
node->otype = otype;
node->gtktypes = gtktypes;
+ node->flags = flags;
node->id = id;
node->args = args;
node->onerror = onerror;
}
Node *
-new_variable(int scope, Type *vtype, char *id, int line_no)
+new_variable(int scope, Type *vtype, char *id, int line_no,
+ char *destructor, int destructor_line,
+ gboolean destructor_simple,
+ char *initializer, int initializer_line)
{
Variable *node = (Variable *)g_new(Node,1);
node->type = VARIABLE_NODE;
node->vtype = vtype;
node->id = id;
node->line_no = line_no;
+ node->destructor = destructor;
+ node->destructor_line = destructor_line;
+ node->destructor_simple = destructor_simple;
+ node->initializer = initializer;
+ node->initializer_line = initializer_line;
return (Node *)node;
}
+
+Type *
+copy_type(Type *type)
+{
+ Node *node;
+
+ if(!type) return NULL;
+
+ node = new_type(type->stars,
+ g_strdup(type->name),
+ g_strdup(type->postfix));
+
+ return (Type *)node;
+}