summaryrefslogtreecommitdiff
path: root/vala/valatypesymbol.vala
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2008-04-14 16:49:37 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-04-14 16:49:37 +0000
commit8cb0a533ffb9e9d1282336dc148cd4f1940e1b3c (patch)
tree7433d64a04d53f5c81b17d835190538c118be45b /vala/valatypesymbol.vala
parent6bab2a017d8946b707c30f3be8d4255a8b3544ad (diff)
downloadvala-8cb0a533ffb9e9d1282336dc148cd4f1940e1b3c.tar.gz
prepare support for nullable and boxed value types
2008-04-14 Juerg Billeter <j@bitron.ch> * vala/valaclass.vala, vala/valainterface.vala, vala/valatypesymbol.vala, vala/valavaluetype.vala, gobject/valaccodegenerator.vala: prepare support for nullable and boxed value types svn path=/trunk/; revision=1222
Diffstat (limited to 'vala/valatypesymbol.vala')
-rw-r--r--vala/valatypesymbol.vala44
1 files changed, 33 insertions, 11 deletions
diff --git a/vala/valatypesymbol.vala b/vala/valatypesymbol.vala
index 01bef96bc..a7d3055bb 100644
--- a/vala/valatypesymbol.vala
+++ b/vala/valatypesymbol.vala
@@ -1,6 +1,6 @@
/* valatype.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -58,23 +58,45 @@ public abstract class Vala.Typesymbol : Symbol {
*
* @return the name of the C function if supported or null otherwise
*/
- public virtual string get_dup_function () {
+ public virtual string? get_dup_function () {
return null;
}
/**
* Returns the C function name that frees instances of this data type.
- * This is only valid for data types with reference type semantics that
- * do not support reference counting. The specified C function must
- * accept one argument pointing to the instance to be freed.
+ * The specified C function must accept one argument pointing to the
+ * instance to be freed.
*
- * @return the name of the C function or null if this data type is not a
- * reference type or if it supports reference counting
+ * @return the name of the C function if supported or null otherwise
*/
- public virtual string get_free_function () {
+ public virtual string? get_free_function () {
return null;
}
-
+
+ /**
+ * Returns the C function name that copies contents of instances of
+ * this data type. This is only applicable to structs. The specified
+ * C function must accept two arguments, the first is the source value
+ * and the second is the destination value.
+ *
+ * @return the name of the C function if supported or null otherwise
+ */
+ public virtual string? get_copy_function () {
+ return null;
+ }
+
+ /**
+ * Returns the C function name that destroys the contents of instances
+ * of this data type. This is only applicable to structs. The specified
+ * C function must accept one argument pointing to the instance to be
+ * destroyed.
+ *
+ * @return the name of the C function if supported or null otherwise
+ */
+ public virtual string? get_destroy_function () {
+ return null;
+ }
+
/**
* Checks whether this data type supports reference counting. This is
* only valid for reference types.
@@ -95,7 +117,7 @@ public abstract class Vala.Typesymbol : Symbol {
* @return the name of the C function or null if this data type does not
* support reference counting
*/
- public virtual string get_ref_function () {
+ public virtual string? get_ref_function () {
return null;
}
@@ -108,7 +130,7 @@ public abstract class Vala.Typesymbol : Symbol {
* @return the name of the C function or null if this data type does not
* support reference counting
*/
- public virtual string get_unref_function () {
+ public virtual string? get_unref_function () {
return null;
}