inner[index] = expr;
}
- public List<CCodeExpression> get_inner () {
+ public unowned List<CCodeExpression> get_inner () {
return inner;
}
declarators.add (decl);
}
+ /**
+ * Returns the list of declarators.
+ *
+ * @return declarators list
+ */
+ public unowned List<CCodeDeclarator> get_declarators () {
+ return declarators;
+ }
+
public override void write (CCodeWriter writer) {
if ((modifiers & (CCodeModifiers.STATIC | CCodeModifiers.INTERNAL | CCodeModifiers.EXTERN)) == 0) {
foreach (CCodeDeclarator decl in declarators) {
* Represents a variable or function pointer declarator in the C code.
*/
public abstract class Vala.CCodeDeclarator : CCodeNode {
+ /**
+ * The declarator name.
+ */
+ public string name { get; set; }
+
/**
* Writes initialization statements for this declarator with the
* specified C code writer if necessary.
}
/**
- * Returns a copy of the list of children.
+ * Returns the list of children.
*
* @return children list
*/
- public List<CCodeNode> get_children () {
+ public unowned List<CCodeNode> get_children () {
return children;
}
}
/**
- * Returns a copy of the list of arguments.
+ * Returns the list of arguments.
*
* @return list of arguments
*/
- public List<CCodeExpression> get_arguments () {
+ public unowned List<CCodeExpression> get_arguments () {
return arguments;
}
* Represents a function pointer declarator in the C code.
*/
public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
- /**
- * The declarator name.
- */
- public string name { get; set; }
-
private List<CCodeParameter> parameters = new ArrayList<CCodeParameter> ();
public CCodeFunctionDeclarator (string name) {
* Represents a variable declarator in the C code.
*/
public class Vala.CCodeVariableDeclarator : CCodeDeclarator {
- /**
- * The variable name.
- */
- public string name { get; set; }
-
/**
* The optional initializer expression.
*/