[vala/wip/attributes: 1/100] Remove code that references the unused Class.free_function_address_of
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/attributes: 1/100] Remove code that references the unused Class.free_function_address_of
- Date: Sat, 2 Jul 2011 12:25:23 +0000 (UTC)
commit 2512f3aa554b2ce610c6575c6673792fc8f73068
Author: Luca Bruno <lucabru src gnome org>
Date: Tue Jun 28 09:26:26 2011 +0200
Remove code that references the unused Class.free_function_address_of
codegen/valaccodebasemodule.vala | 9 +--------
vala/valaclass.vala | 9 ---------
2 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 39adeb4..34927a4 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -2589,13 +2589,6 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
free_call.add_argument (new CCodeIdentifier ("self"));
ccode.add_expression (free_call);
- } else if (cl != null) {
- assert (cl.free_function_address_of);
-
- var free_call = new CCodeFunctionCall (new CCodeIdentifier (type.data_type.get_free_function ()));
- free_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("self")));
-
- ccode.add_expression (free_call);
} else {
var st = type.data_type as Struct;
if (st != null && st.is_disposable ()) {
@@ -2683,7 +2676,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
} else {
var cl = type.data_type as Class;
- if (cl != null && (cl.free_function_address_of || cl.is_gboxed)) {
+ if (cl != null && cl.is_gboxed) {
unref_function = generate_free_func_wrapper (type);
} else {
unref_function = type.data_type.get_free_function ();
diff --git a/vala/valaclass.vala b/vala/valaclass.vala
index 92ca064..c88b5d3 100644
--- a/vala/valaclass.vala
+++ b/vala/valaclass.vala
@@ -102,12 +102,6 @@ public class Vala.Class : ObjectTypeSymbol {
*/
public bool has_class_private_fields { get; private set; }
- /**
- * Specifies whether the free function requires the address of a
- * pointer instead of just the pointer.
- */
- public bool free_function_address_of { get; private set; }
-
public bool is_gboxed { get { return (free_function == "g_boxed_free"); } }
private string cname;
@@ -693,9 +687,6 @@ public class Vala.Class : ObjectTypeSymbol {
if (a.has_argument ("free_function")) {
set_free_function (a.get_string ("free_function"));
}
- if (a.has_argument ("free_function_address_of")) {
- free_function_address_of = a.get_bool ("free_function_address_of");
- }
if (a.has_argument ("type_id")) {
type_id = a.get_string ("type_id");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]