+2009-01-16 Jürg Billeter <j@bitron.ch>
+
+ * vala/valacodewriter.vala:
+
+ Support void ref functions
+
+ * vapigen/valagidlparser.vala:
+
+ Detect void ref functions, patch by Andreas Brauchli,
+ fixes bug 549061
+
+ * vapi/gconf-2.0.vapi: regenerated
+
2009-01-16 Jürg Billeter <j@bitron.ch>
* gobject/valaccodestructmodule.vala:
if (cl.is_reference_counting ()) {
if (cl.base_class == null || cl.base_class.get_ref_function () == null || cl.base_class.get_ref_function () != cl.get_ref_function ()) {
write_string ("ref_function = \"%s\", ".printf (cl.get_ref_function ()));
+ if (cl.ref_function_void) {
+ write_string ("ref_function_void = true, ");
+ }
}
if (cl.base_class == null || cl.base_class.get_unref_function () == null || cl.base_class.get_unref_function () != cl.get_unref_function ()) {
write_string ("unref_function = \"%s\", ".printf (cl.get_unref_function ()));
[CCode (cprefix = "GConf", lower_case_cprefix = "gconf_")]
namespace GConf {
[Compact]
- [CCode (ref_function = "gconf_change_set_ref", unref_function = "gconf_change_set_unref", cheader_filename = "gconf/gconf.h")]
+ [CCode (ref_function = "gconf_change_set_ref", ref_function_void = true, unref_function = "gconf_change_set_unref", cheader_filename = "gconf/gconf.h")]
public class ChangeSet {
public bool check_value (string key, out unowned GConf.Value value_retloc);
public void clear ();
public virtual signal void value_changed (string key, void* value);
}
[Compact]
- [CCode (ref_function = "gconf_engine_ref", unref_function = "gconf_engine_unref", cheader_filename = "gconf/gconf.h")]
+ [CCode (ref_function = "gconf_engine_ref", ref_function_void = true, unref_function = "gconf_engine_unref", cheader_filename = "gconf/gconf.h")]
public class Engine {
public unowned GLib.SList all_dirs (string dir) throws GLib.Error;
public unowned GLib.SList all_entries (string dir) throws GLib.Error;
public bool unset (string key) throws GLib.Error;
}
[Compact]
- [CCode (ref_function = "gconf_entry_ref", unref_function = "gconf_entry_unref", cheader_filename = "gconf/gconf.h")]
+ [CCode (ref_function = "gconf_entry_ref", ref_function_void = true, unref_function = "gconf_entry_unref", cheader_filename = "gconf/gconf.h")]
public class Entry {
public weak string key;
public weak GConf.Value value;
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
if (member.type == IdlNodeTypeId.FUNCTION) {
if (member.name == "ref") {
ref_function = ((IdlNodeFunction) member).symbol;
+ ref_function_void = (parse_type (((IdlNodeFunction) member).result.type) is VoidType);
} else if (member.name == "unref") {
unref_function = ((IdlNodeFunction) member).symbol;
} else if (member.name == "free" || member.name == "destroy") {
if (ref_function != null) {
cl.set_ref_function (ref_function);
+ cl.ref_function_void = ref_function_void;
}
if (copy_function != null) {
cl.set_dup_function (copy_function);
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
if (member.type == IdlNodeTypeId.FUNCTION) {
if (member.name == "ref") {
ref_function = ((IdlNodeFunction) member).symbol;
+ ref_function_void = (parse_type (((IdlNodeFunction) member).result.type) is VoidType);
} else if (member.name == "unref") {
unref_function = ((IdlNodeFunction) member).symbol;
} else if (member.name == "free" || member.name == "destroy") {
if (ref_function != null) {
cl.set_ref_function (ref_function);
+ cl.ref_function_void = ref_function_void;
}
if (copy_function != null) {
cl.set_dup_function (copy_function);
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
if (member.type == IdlNodeTypeId.FUNCTION) {
if (member.name == "ref") {
ref_function = ((IdlNodeFunction) member).symbol;
+ ref_function_void = (parse_type (((IdlNodeFunction) member).result.type) is VoidType);
} else if (member.name == "unref") {
unref_function = ((IdlNodeFunction) member).symbol;
} else if (member.name == "free" || member.name == "destroy") {
if (ref_function != null) {
cl.set_ref_function (ref_function);
+ cl.ref_function_void = ref_function_void;
}
if (copy_function != null) {
cl.set_dup_function (copy_function);