vala r2354 - in trunk: . vala vapi vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2354 - in trunk: . vala vapi vapigen
- Date: Fri, 16 Jan 2009 16:04:41 +0000 (UTC)
Author: juergbi
Date: Fri Jan 16 16:04:41 2009
New Revision: 2354
URL: http://svn.gnome.org/viewvc/vala?rev=2354&view=rev
Log:
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
Modified:
trunk/ChangeLog
trunk/vala/valacodewriter.vala
trunk/vapi/gconf-2.0.vapi
trunk/vapigen/valagidlparser.vala
Modified: trunk/vala/valacodewriter.vala
==============================================================================
--- trunk/vala/valacodewriter.vala (original)
+++ trunk/vala/valacodewriter.vala Fri Jan 16 16:04:41 2009
@@ -135,6 +135,9 @@
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 ()));
Modified: trunk/vapi/gconf-2.0.vapi
==============================================================================
--- trunk/vapi/gconf-2.0.vapi (original)
+++ trunk/vapi/gconf-2.0.vapi Fri Jan 16 16:04:41 2009
@@ -3,7 +3,7 @@
[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 ();
@@ -86,7 +86,7 @@
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;
@@ -129,7 +129,7 @@
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;
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Fri Jan 16 16:04:41 2009
@@ -480,6 +480,7 @@
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
@@ -489,6 +490,7 @@
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") {
@@ -512,6 +514,7 @@
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);
@@ -603,6 +606,7 @@
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
@@ -612,6 +616,7 @@
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") {
@@ -635,6 +640,7 @@
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);
@@ -730,6 +736,7 @@
current_data_type = cl;
+ bool ref_function_void = false;
string ref_function = null;
string unref_function = null;
string copy_function = null;
@@ -739,6 +746,7 @@
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") {
@@ -762,6 +770,7 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]