Commit 5a32f9e2 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

add internal copy of libgee and use Gee.ArrayList, Gee.HashMap, and

2007-07-27  Juerg Billeter  <j@bitron.ch>

	* Makefile.am, README, configure.ac, gee/Makefile.am,
	  gee/arraylist.vala, gee/collection.vala, gee/hashmap.vala,
	  gee/hashset.vala, gee/iterable.vala, gee/iterator.vala, gee/list.vala,
	  gee/map.vala, gee/readonlycollection.vala, gee/readonlylist.vala,
	  gee/readonlymap.vala, gee/readonlyset.vala, gee/set.vala,
	  vala/Makefile.am, vala/parser.y, vala/valaarray.vala,
	  vala/valaarraycreationexpression.vala, vala/valaattribute.vala,
	  vala/valablock.vala, vala/valacallback.vala, vala/valaclass.vala,
	  vala/valacodecontext.vala, vala/valacodenode.vala,
	  vala/valadatatype.vala, vala/valaelementaccess.vala,
	  vala/valaenum.vala, vala/valaexpression.vala, vala/valafield.vala,
	  vala/valaformalparameter.vala, vala/valaforstatement.vala,
	  vala/valainitializerlist.vala, vala/valainstancecast.vala,
	  vala/valainterface.vala, vala/valainterfacewriter.vala,
	  vala/valainvocationexpression.vala, vala/valainvokable.vala,
	  vala/valalambdaexpression.vala,
	  vala/valalocalvariabledeclaration.vala, vala/valamember.vala,
	  vala/valamemberaccess.vala, vala/valamemorymanager.vala,
	  vala/valamethod.vala, vala/valanamespace.vala,
	  vala/valaobjectcreationexpression.vala, vala/valapointer.vala,
	  vala/valascope.vala, vala/valasemanticanalyzer.vala,
	  vala/valasignal.vala, vala/valasourcefile.vala,
	  vala/valasourcefilecycle.vala, vala/valastruct.vala,
	  vala/valaswitchsection.vala, vala/valaswitchstatement.vala,
	  vala/valasymbol.vala, vala/valasymbolresolver.vala,
	  vala/valatrystatement.vala, vala/valatypeparameter.vala,
	  vala/valatypereference.vala, vala/valavariabledeclarator.vala,
	  ccode/Makefile.am, ccode/valaccodeblock.vala,
	  ccode/valaccodecasestatement.vala,
	  ccode/valaccodecommaexpression.vala, ccode/valaccodedeclaration.vala,
	  ccode/valaccodeenum.vala, ccode/valaccodeforstatement.vala,
	  ccode/valaccodefragment.vala, ccode/valaccodefunction.vala,
	  ccode/valaccodefunctioncall.vala,
	  ccode/valaccodefunctiondeclarator.vala,
	  ccode/valaccodeinitializerlist.vala, ccode/valaccodestruct.vala,
	  ccode/valaccodeswitchstatement.vala, gobject/Makefile.am,
	  gobject/valaclassregisterfunction.vala,
	  gobject/valacodegenerator.vala,
	  gobject/valacodegeneratorassignment.vala,
	  gobject/valacodegeneratorclass.vala,
	  gobject/valacodegeneratorinterface.vala,
	  gobject/valacodegeneratorinvocationexpression.vala,
	  gobject/valacodegeneratormemberaccess.vala,
	  gobject/valacodegeneratormethod.vala,
	  gobject/valacodegeneratorsignal.vala,
	  gobject/valacodegeneratorsourcefile.vala,
	  gobject/valainterfaceregisterfunction.vala, compiler/Makefile.am,
	  vapi/gio-standalone.vala, vapi/gstreamer-0.10.vala,
	  vapi/gtk+-2.0.vala, vapigen/Makefile.am, vapigen/valagidlparser.vala:
	  add internal copy of libgee and use Gee.ArrayList, Gee.HashMap, and
	  Gee.HashSet instead of GLib.List and GLib.HashTable

svn path=/trunk/; revision=406
parent b49e7bae
2007-07-27 Jürg Billeter <j@bitron.ch>
* Makefile.am, README, configure.ac, gee/Makefile.am,
gee/arraylist.vala, gee/collection.vala, gee/hashmap.vala,
gee/hashset.vala, gee/iterable.vala, gee/iterator.vala, gee/list.vala,
gee/map.vala, gee/readonlycollection.vala, gee/readonlylist.vala,
gee/readonlymap.vala, gee/readonlyset.vala, gee/set.vala,
vala/Makefile.am, vala/parser.y, vala/valaarray.vala,
vala/valaarraycreationexpression.vala, vala/valaattribute.vala,
vala/valablock.vala, vala/valacallback.vala, vala/valaclass.vala,
vala/valacodecontext.vala, vala/valacodenode.vala,
vala/valadatatype.vala, vala/valaelementaccess.vala,
vala/valaenum.vala, vala/valaexpression.vala, vala/valafield.vala,
vala/valaformalparameter.vala, vala/valaforstatement.vala,
vala/valainitializerlist.vala, vala/valainstancecast.vala,
vala/valainterface.vala, vala/valainterfacewriter.vala,
vala/valainvocationexpression.vala, vala/valainvokable.vala,
vala/valalambdaexpression.vala,
vala/valalocalvariabledeclaration.vala, vala/valamember.vala,
vala/valamemberaccess.vala, vala/valamemorymanager.vala,
vala/valamethod.vala, vala/valanamespace.vala,
vala/valaobjectcreationexpression.vala, vala/valapointer.vala,
vala/valascope.vala, vala/valasemanticanalyzer.vala,
vala/valasignal.vala, vala/valasourcefile.vala,
vala/valasourcefilecycle.vala, vala/valastruct.vala,
vala/valaswitchsection.vala, vala/valaswitchstatement.vala,
vala/valasymbol.vala, vala/valasymbolresolver.vala,
vala/valatrystatement.vala, vala/valatypeparameter.vala,
vala/valatypereference.vala, vala/valavariabledeclarator.vala,
ccode/Makefile.am, ccode/valaccodeblock.vala,
ccode/valaccodecasestatement.vala,
ccode/valaccodecommaexpression.vala, ccode/valaccodedeclaration.vala,
ccode/valaccodeenum.vala, ccode/valaccodeforstatement.vala,
ccode/valaccodefragment.vala, ccode/valaccodefunction.vala,
ccode/valaccodefunctioncall.vala,
ccode/valaccodefunctiondeclarator.vala,
ccode/valaccodeinitializerlist.vala, ccode/valaccodestruct.vala,
ccode/valaccodeswitchstatement.vala, gobject/Makefile.am,
gobject/valaclassregisterfunction.vala,
gobject/valacodegenerator.vala,
gobject/valacodegeneratorassignment.vala,
gobject/valacodegeneratorclass.vala,
gobject/valacodegeneratorinterface.vala,
gobject/valacodegeneratorinvocationexpression.vala,
gobject/valacodegeneratormemberaccess.vala,
gobject/valacodegeneratormethod.vala,
gobject/valacodegeneratorsignal.vala,
gobject/valacodegeneratorsourcefile.vala,
gobject/valainterfaceregisterfunction.vala, compiler/Makefile.am,
vapi/gio-standalone.vala, vapi/gstreamer-0.10.vala,
vapi/gtk+-2.0.vala, vapigen/Makefile.am, vapigen/valagidlparser.vala:
add internal copy of libgee and use Gee.ArrayList, Gee.HashMap, and
Gee.HashSet instead of GLib.List and GLib.HashTable
2007-07-27 Jürg Billeter <j@bitron.ch> 2007-07-27 Jürg Billeter <j@bitron.ch>
* vala/Makefile.am, vala/valaarray.vala, vala/valaarraymovemethod.vala, * vala/Makefile.am, vala/valaarray.vala, vala/valaarraymovemethod.vala,
......
...@@ -8,6 +8,7 @@ VAPIGEN_SUBDIRS = \ ...@@ -8,6 +8,7 @@ VAPIGEN_SUBDIRS = \
endif endif
SUBDIRS = \ SUBDIRS = \
gee \
ccode \ ccode \
vala \ vala \
gobject \ gobject \
...@@ -19,6 +20,7 @@ SUBDIRS = \ ...@@ -19,6 +20,7 @@ SUBDIRS = \
$(NULL) $(NULL)
DIST_SUBDIRS = \ DIST_SUBDIRS = \
gee \
ccode \ ccode \
vala \ vala \
gobject \ gobject \
......
...@@ -40,4 +40,4 @@ all compile-time information is available when generating a binding. ...@@ -40,4 +40,4 @@ all compile-time information is available when generating a binding.
More information about Vala is available at More information about Vala is available at
http://www.paldo.org/vala/ http://live.gnome.org/Vala/
...@@ -215,7 +215,7 @@ ccodeinclude_HEADERS = \ ...@@ -215,7 +215,7 @@ ccodeinclude_HEADERS = \
$(NULL) $(NULL)
ccode.vala ccode.vala.stamp: $(filter %.vala,$(libvalaccode_la_SOURCES)) ccode.vala ccode.vala.stamp: $(filter %.vala,$(libvalaccode_la_SOURCES))
$(VALAC) --vapidir $(srcdir)/../vapi --library ccode $^ $(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../gee --pkg gee --library ccode $^
touch $@ touch $@
libvalaccode_la_LIBADD = \ libvalaccode_la_LIBADD = \
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a C code block. * Represents a C code block.
...@@ -32,13 +33,13 @@ public class Vala.CCodeBlock : CCodeStatement { ...@@ -32,13 +33,13 @@ public class Vala.CCodeBlock : CCodeStatement {
*/ */
public bool suppress_newline { get; set; } public bool suppress_newline { get; set; }
List<CCodeNode> statements; private Gee.List<CCodeNode> statements = new ArrayList<CCodeNode> ();
/** /**
* Prepend the specified statement to the list of statements. * Prepend the specified statement to the list of statements.
*/ */
public void prepend_statement (CCodeNode! statement) { public void prepend_statement (CCodeNode! statement) {
statements.prepend (statement); statements.insert (0, statement);
} }
/** /**
...@@ -46,7 +47,7 @@ public class Vala.CCodeBlock : CCodeStatement { ...@@ -46,7 +47,7 @@ public class Vala.CCodeBlock : CCodeStatement {
*/ */
public void add_statement (CCodeNode! statement) { public void add_statement (CCodeNode! statement) {
/* allow generic nodes to include comments */ /* allow generic nodes to include comments */
statements.append (statement); statements.add (statement);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a case block in a switch statement in C code. * Represents a case block in a switch statement in C code.
...@@ -29,12 +30,11 @@ public class Vala.CCodeCaseStatement : CCodeStatement { ...@@ -29,12 +30,11 @@ public class Vala.CCodeCaseStatement : CCodeStatement {
/** /**
* The case expression. * The case expression.
*/ */
public CCodeExpression! expression { get; set construct; } public CCodeExpression! expression { get; set; }
private List<CCodeStatement> statements; private Gee.List<CCodeStatement> statements = new ArrayList<CCodeStatement> ();
public CCodeCaseStatement (CCodeExpression! expr) { public CCodeCaseStatement (construct CCodeExpression! expression) {
expression = expr;
} }
/** /**
...@@ -43,7 +43,7 @@ public class Vala.CCodeCaseStatement : CCodeStatement { ...@@ -43,7 +43,7 @@ public class Vala.CCodeCaseStatement : CCodeStatement {
* @param stmt a statement * @param stmt a statement
*/ */
public void add_statement (CCodeStatement! stmt) { public void add_statement (CCodeStatement! stmt) {
statements.append (stmt); statements.add (stmt);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
/* valaccodecommaexpression.vala /* valaccodecommaexpression.vala
* *
* Copyright (C) 2006 Jürg Billeter * Copyright (C) 2006-2007 Jürg Billeter
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a comma separated expression list in the C code. * Represents a comma separated expression list in the C code.
*/ */
public class Vala.CCodeCommaExpression : CCodeExpression { public class Vala.CCodeCommaExpression : CCodeExpression {
private List<CCodeExpression> inner; private Gee.List<CCodeExpression> inner = new ArrayList<CCodeExpression> ();
/** /**
* Appends the specified expression to the expression list. * Appends the specified expression to the expression list.
...@@ -34,7 +35,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression { ...@@ -34,7 +35,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression {
* @param expr a C code expression * @param expr a C code expression
*/ */
public void append_expression (CCodeExpression! expr) { public void append_expression (CCodeExpression! expr) {
inner.append (expr); inner.add (expr);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a local variable declaration in the C code. * Represents a local variable declaration in the C code.
...@@ -29,17 +30,16 @@ public class Vala.CCodeDeclaration : CCodeStatement { ...@@ -29,17 +30,16 @@ public class Vala.CCodeDeclaration : CCodeStatement {
/** /**
* The type of the local variable. * The type of the local variable.
*/ */
public string! type_name { get; set construct; } public string! type_name { get; set; }
/** /**
* The declaration modifier. * The declaration modifier.
*/ */
public CCodeModifiers modifiers { get; set; } public CCodeModifiers modifiers { get; set; }
private List<CCodeDeclarator> declarators; private Gee.List<CCodeDeclarator> declarators = new ArrayList<CCodeDeclarator> ();
public CCodeDeclaration (string! _type_name) { public CCodeDeclaration (construct string! type_name) {
type_name = _type_name;
} }
/** /**
...@@ -48,7 +48,7 @@ public class Vala.CCodeDeclaration : CCodeStatement { ...@@ -48,7 +48,7 @@ public class Vala.CCodeDeclaration : CCodeStatement {
* @param decl a declarator * @param decl a declarator
*/ */
public void add_declarator (CCodeDeclarator! decl) { public void add_declarator (CCodeDeclarator! decl) {
declarators.append (decl); declarators.add (decl);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents an enum in the C code. * Represents an enum in the C code.
...@@ -31,10 +32,9 @@ public class Vala.CCodeEnum : CCodeNode { ...@@ -31,10 +32,9 @@ public class Vala.CCodeEnum : CCodeNode {
*/ */
public string name { get; set; } public string name { get; set; }
private List<string> values; private Gee.List<string> values = new ArrayList<string> ();
public CCodeEnum (string n = null) { public CCodeEnum (construct string name = null) {
name = n;
} }
/** /**
...@@ -45,9 +45,9 @@ public class Vala.CCodeEnum : CCodeNode { ...@@ -45,9 +45,9 @@ public class Vala.CCodeEnum : CCodeNode {
*/ */
public void add_value (string! name, string value = null) { public void add_value (string! name, string value = null) {
if (value == null) { if (value == null) {
values.append (name); values.add (name);
} else { } else {
values.append ("%s = %s".printf (name, value)); values.add ("%s = %s".printf (name, value));
} }
} }
......
/* valaccodeforstatement.vala /* valaccodeforstatement.vala
* *
* Copyright (C) 2006 Jürg Billeter * Copyright (C) 2006-2007 Jürg Billeter
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a for iteration statement in the C code. * Represents a for iteration statement in the C code.
...@@ -29,19 +30,17 @@ public class Vala.CCodeForStatement : CCodeStatement { ...@@ -29,19 +30,17 @@ public class Vala.CCodeForStatement : CCodeStatement {
/** /**
* The loop condition. * The loop condition.
*/ */
public CCodeExpression! condition { get; set construct; } public CCodeExpression! condition { get; set; }
/** /**
* The loop body. * The loop body.
*/ */
public CCodeStatement body { get; set; } public CCodeStatement body { get; set; }
private List<CCodeExpression> initializer; private Gee.List<CCodeExpression> initializer = new ArrayList<CCodeExpression> ();
private List<CCodeExpression> iterator; private Gee.List<CCodeExpression> iterator = new ArrayList<CCodeExpression> ();
public CCodeForStatement (CCodeExpression! cond, CCodeStatement stmt = null) { public CCodeForStatement (construct CCodeExpression! condition, construct CCodeStatement body = null) {
condition = cond;
body = stmt;
} }
/** /**
...@@ -50,7 +49,7 @@ public class Vala.CCodeForStatement : CCodeStatement { ...@@ -50,7 +49,7 @@ public class Vala.CCodeForStatement : CCodeStatement {
* @param expr an initializer expression * @param expr an initializer expression
*/ */
public void add_initializer (CCodeExpression! expr) { public void add_initializer (CCodeExpression! expr) {
initializer.append (expr); initializer.add (expr);
} }
/** /**
...@@ -59,7 +58,7 @@ public class Vala.CCodeForStatement : CCodeStatement { ...@@ -59,7 +58,7 @@ public class Vala.CCodeForStatement : CCodeStatement {
* @param expr an iterator expression * @param expr an iterator expression
*/ */
public void add_iterator (CCodeExpression! expr) { public void add_iterator (CCodeExpression! expr) {
iterator.append (expr); iterator.add (expr);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a container for C code nodes. * Represents a container for C code nodes.
*/ */
public class Vala.CCodeFragment : CCodeNode { public class Vala.CCodeFragment : CCodeNode {
private List<CCodeNode> children; private Gee.List<CCodeNode> children = new ArrayList<CCodeNode> ();
/** /**
* Appends the specified code node to this code fragment. * Appends the specified code node to this code fragment.
...@@ -34,7 +35,7 @@ public class Vala.CCodeFragment : CCodeNode { ...@@ -34,7 +35,7 @@ public class Vala.CCodeFragment : CCodeNode {
* @param node a C code node * @param node a C code node
*/ */
public void append (CCodeNode! node) { public void append (CCodeNode! node) {
children.append (node); children.add (node);
} }
/** /**
...@@ -42,8 +43,8 @@ public class Vala.CCodeFragment : CCodeNode { ...@@ -42,8 +43,8 @@ public class Vala.CCodeFragment : CCodeNode {
* *
* @return children list * @return children list
*/ */
public List<weak CCodeNode> get_children () { public Collection<CCodeNode> get_children () {
return children.copy (); return new ReadOnlyCollection<CCodeNode> (children);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a function declaration in the C code. * Represents a function declaration in the C code.
...@@ -29,7 +30,7 @@ public class Vala.CCodeFunction : CCodeNode { ...@@ -29,7 +30,7 @@ public class Vala.CCodeFunction : CCodeNode {
/** /**
* The name of this function. * The name of this function.
*/ */
public string! name { get; set construct; } public string! name { get; set; }
/** /**
* The function modifiers. * The function modifiers.
...@@ -39,18 +40,16 @@ public class Vala.CCodeFunction : CCodeNode { ...@@ -39,18 +40,16 @@ public class Vala.CCodeFunction : CCodeNode {
/** /**
* The function return type. * The function return type.
*/ */
public string! return_type { get; set construct; } public string! return_type { get; set; }
/** /**
* The function body. * The function body.
*/ */
public CCodeBlock block { get; set; } public CCodeBlock block { get; set; }
private List<CCodeFormalParameter> parameters; private Gee.List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
public CCodeFunction (string! _name, string! _return_type) { public CCodeFunction (construct string! name, construct string! return_type) {
name = _name;
return_type = _return_type;
} }
/** /**
...@@ -59,7 +58,7 @@ public class Vala.CCodeFunction : CCodeNode { ...@@ -59,7 +58,7 @@ public class Vala.CCodeFunction : CCodeNode {
* @param param a formal parameter * @param param a formal parameter
*/ */
public void add_parameter (CCodeFormalParameter! param) { public void add_parameter (CCodeFormalParameter! param) {
parameters.append (param); parameters.add (param);
} }
/** /**
...@@ -75,7 +74,7 @@ public class Vala.CCodeFunction : CCodeNode { ...@@ -75,7 +74,7 @@ public class Vala.CCodeFunction : CCodeNode {
* func.parameters = parameters.copy (); * func.parameters = parameters.copy ();
*/ */
foreach (CCodeFormalParameter param in parameters) { foreach (CCodeFormalParameter param in parameters) {
func.parameters.append (param); func.parameters.add (param);
} }
func.block = block; func.block = block;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a function call in the C code. * Represents a function call in the C code.
...@@ -31,7 +32,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression { ...@@ -31,7 +32,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
*/ */
public CCodeExpression call { get; set; } public CCodeExpression call { get; set; }
private List<CCodeExpression> arguments; private Gee.List<CCodeExpression> arguments = new ArrayList<CCodeExpression> ();
public CCodeFunctionCall (construct CCodeExpression call = null) { public CCodeFunctionCall (construct CCodeExpression call = null) {
} }
...@@ -42,7 +43,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression { ...@@ -42,7 +43,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
* @param expr a C code expression * @param expr a C code expression
*/ */
public void add_argument (CCodeExpression! expr) { public void add_argument (CCodeExpression! expr) {
arguments.append (expr); arguments.add (expr);
} }
/** /**
...@@ -50,8 +51,8 @@ public class Vala.CCodeFunctionCall : CCodeExpression { ...@@ -50,8 +51,8 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
* *
* @return list of arguments * @return list of arguments
*/ */
public List<weak CCodeExpression> get_arguments () { public Gee.List<CCodeExpression> get_arguments () {
return arguments.copy (); return new ReadOnlyList<CCodeExpression> (arguments);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a function pointer declarator in the C code. * Represents a function pointer declarator in the C code.
...@@ -29,12 +30,11 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator { ...@@ -29,12 +30,11 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
/** /**
* The declarator name. * The declarator name.
*/ */
public string! name { get; set construct; } public string! name { get; set; }
private List<CCodeFormalParameter> parameters; private Gee.List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
public CCodeFunctionDeclarator (string! n) { public CCodeFunctionDeclarator (construct string! name) {
name = n;
} }
/** /**
...@@ -43,7 +43,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator { ...@@ -43,7 +43,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
* @param param a formal parameter * @param param a formal parameter
*/ */
public void add_parameter (CCodeFormalParameter! param) { public void add_parameter (CCodeFormalParameter! param) {
parameters.append (param); parameters.add (param);
} }
public override void write (CCodeWriter! writer) { public override void write (CCodeWriter! writer) {
......
/* valaccodeinitializerlist.vala /* valaccodeinitializerlist.vala
* *
* Copyright (C) 2006 Jürg Billeter * Copyright (C) 2006-2007 Jürg Billeter
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
*/ */
using GLib; using GLib;
using Gee;
/** /**
* Represents a struct or array initializer list in the C code. * Represents a struct or array initializer list in the C code.
*/ */
public class Vala.CCodeInitializerList : CCodeExpression { public class Vala.CCodeInitializerList : CCodeExpression {
private List<CCodeExpression> initializers; private Gee.List<CCodeExpression> initializers = new ArrayList<CCodeExpression> ();