[vala/wip/attributes: 63/121] Drop Class.ref_function_void
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 63/121] Drop Class.ref_function_void
- Date: Mon, 4 Jul 2011 17:14:03 +0000 (UTC)
commit 5542c8e83e7b5d700a1c787c6e44c6e1c79b8a4a
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Jun 29 20:42:33 2011 +0200
Drop Class.ref_function_void
codegen/valadovabasemodule.vala | 6 +++++-
vala/valaclass.vala | 20 --------------------
vapigen/valagidlparser.vala | 6 +++---
3 files changed, 8 insertions(+), 24 deletions(-)
---
diff --git a/codegen/valadovabasemodule.vala b/codegen/valadovabasemodule.vala
index 98b1b29..1dc85cc 100644
--- a/codegen/valadovabasemodule.vala
+++ b/codegen/valadovabasemodule.vala
@@ -1442,7 +1442,7 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
bool is_ref_function_void (DataType type) {
var cl = type.data_type as Class;
- if (cl != null && cl.ref_function_void) {
+ if (cl != null && get_ccode_ref_function_void (cl)) {
return true;
} else {
return false;
@@ -2298,6 +2298,10 @@ public abstract class Vala.DovaBaseModule : CodeGenerator {
return CCodeBaseModule.get_ccode_dup_function (node);
}
+ public bool get_ccode_ref_function_void (CodeNode node) {
+ return CCodeBaseModule.get_ccode_ref_function_void (node);
+ }
+
public DataType? get_this_type () {
if (current_method != null && current_method.binding == MemberBinding.INSTANCE) {
return current_method.this_parameter.variable_type;
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index c199bd8..c462f7c 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -70,22 +70,6 @@ public class Vala.Class : ObjectTypeSymbol {
}
/**
- * Specifies wheather the ref function returns void instead of the
- * object.
- */
- public bool ref_function_void {
- get {
- if (base_class != null) {
- return base_class.ref_function_void;
- }
- return _ref_function_void;
- }
- set {
- _ref_function_void = value;
- }
- }
-
- /**
* The name of the function to use to check whether a value is an instance of
* this class. If this is null then the default type check function should be
* used instead.
@@ -109,7 +93,6 @@ public class Vala.Class : ObjectTypeSymbol {
private string type_id;
private string ref_function;
private string unref_function;
- private bool _ref_function_void;
private string ref_sink_function;
private string param_spec_function;
private bool _is_compact;
@@ -661,9 +644,6 @@ public class Vala.Class : ObjectTypeSymbol {
if (a.has_argument ("ref_function")) {
set_ref_function (a.get_string ("ref_function"));
}
- if (a.has_argument ("ref_function_void")) {
- this.ref_function_void = a.get_bool ("ref_function_void");
- }
if (a.has_argument ("unref_function")) {
set_unref_function (a.get_string ("unref_function"));
}
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index eac71ed..089a48f 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -921,7 +921,7 @@ public class Vala.GIdlParser : CodeVisitor {
if (ref_function != null) {
cl.set_attribute_string ("CCode", "ref_function", ref_function);
- cl.set_attribute_string ("CCOde", "ref_function_void", ref_function_void);
+ cl.set_attribute_string ("CCode", "ref_function_void", ref_function_void);
}
if (copy_function != null) {
cl.set_attribute_string ("CCode", "copy_function", copy_function);
@@ -1059,7 +1059,7 @@ public class Vala.GIdlParser : CodeVisitor {
if (ref_function != null) {
cl.set_attribute_string ("CCode", "ref_function", ref_function);
- cl.set_attribute_string ("CCOde", "ref_function_void", ref_function_void);
+ cl.set_attribute_string ("CCode", "ref_function_void", ref_function_void);
}
if (copy_function != null) {
cl.set_attribute_string ("CCode", "copy_function", copy_function);
@@ -1246,7 +1246,7 @@ public class Vala.GIdlParser : CodeVisitor {
if (ref_function != null) {
cl.set_attribute_string ("CCode", "ref_function", ref_function);
- cl.set_attribute_string ("CCOde", "ref_function_void", ref_function_void);
+ cl.set_attribute_string ("CCode", "ref_function_void", ref_function_void);
}
if (copy_function != null) {
cl.set_attribute_string ("CCode", "copy_function", copy_function);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]