[vala] dova: Rename equal method to equals
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] dova: Rename equal method to equals
- Date: Wed, 16 Jun 2010 06:33:02 +0000 (UTC)
commit 1290b4b7cfd796ede577d1e2adb997c6eb6d06bf
Author: Jürg Billeter <j bitron ch>
Date: Wed Jun 16 08:07:39 2010 +0200
dova: Rename equal method to equals
codegen/valadovaobjectmodule.vala | 56 +++++++++++++++---------------
codegen/valadovavaluemodule.vala | 66 ++++++++++++++++++------------------
2 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/codegen/valadovaobjectmodule.vala b/codegen/valadovaobjectmodule.vala
index 30eb4da..99e8c96 100644
--- a/codegen/valadovaobjectmodule.vala
+++ b/codegen/valadovaobjectmodule.vala
@@ -54,14 +54,14 @@ internal class Vala.DovaObjectModule : DovaArrayModule {
source_declarations.add_type_member_declaration (value_copy_function);
- var value_equal_function = new CCodeFunction ("dova_type_value_equal", "bool");
- value_equal_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
+ var value_equals_function = new CCodeFunction ("dova_type_value_equals", "bool");
+ value_equals_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
- source_declarations.add_type_member_declaration (value_equal_function);
+ source_declarations.add_type_member_declaration (value_equals_function);
var value_hash_function = new CCodeFunction ("dova_type_value_hash", "int32_t");
value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
@@ -136,7 +136,7 @@ internal class Vala.DovaObjectModule : DovaArrayModule {
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
- vdeclarator = new CCodeFunctionDeclarator ("value_equal");
+ vdeclarator = new CCodeFunctionDeclarator ("value_equals");
vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
vdeclarator.add_parameter (new CCodeFormalParameter ("other", "void *"));
@@ -247,8 +247,8 @@ internal class Vala.DovaObjectModule : DovaArrayModule {
decl_space.add_type_member_declaration (create_set_value_copy_function (true));
}
- CCodeFunction create_set_value_equal_function (bool decl_only = false) {
- var result = new CCodeFunction ("dova_type_set_value_equal");
+ CCodeFunction create_set_value_equals_function (bool decl_only = false) {
+ var result = new CCodeFunction ("dova_type_set_value_equals");
result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, int32_t value_index, void *other, int32_t other_index)", "bool"));
if (decl_only) {
@@ -260,15 +260,15 @@ internal class Vala.DovaObjectModule : DovaArrayModule {
var priv_call = new CCodeFunctionCall (new CCodeIdentifier ("DOVA_TYPE_GET_PRIVATE"));
priv_call.add_argument (new CCodeIdentifier ("type"));
- result.block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (priv_call, "value_equal"), new CCodeIdentifier ("function"))));
+ result.block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (priv_call, "value_equals"), new CCodeIdentifier ("function"))));
return result;
}
- public void declare_set_value_equal_function (CCodeDeclarationSpace decl_space) {
- if (decl_space.add_symbol_declaration (type_class, "dova_type_set_value_equal")) {
+ public void declare_set_value_equals_function (CCodeDeclarationSpace decl_space) {
+ if (decl_space.add_symbol_declaration (type_class, "dova_type_set_value_equals")) {
return;
}
- decl_space.add_type_member_declaration (create_set_value_equal_function (true));
+ decl_space.add_type_member_declaration (create_set_value_equals_function (true));
}
CCodeFunction create_set_value_hash_function (bool decl_only = false) {
@@ -646,28 +646,28 @@ internal class Vala.DovaObjectModule : DovaArrayModule {
declare_set_value_copy_function (internal_header_declarations);
source_type_member_definition.append (create_set_value_copy_function ());
- var value_equal_function = new CCodeFunction ("dova_type_value_equal", "bool");
- value_equal_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
- value_equal_function.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
+ var value_equals_function = new CCodeFunction ("dova_type_value_equals", "bool");
+ value_equals_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("other", "void *"));
+ value_equals_function.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
- value_equal_function.block = new CCodeBlock ();
+ value_equals_function.block = new CCodeBlock ();
- ccall = new CCodeFunctionCall (new CCodeMemberAccess.pointer (priv_call, "value_equal"));
+ ccall = new CCodeFunctionCall (new CCodeMemberAccess.pointer (priv_call, "value_equals"));
ccall.add_argument (new CCodeIdentifier ("value"));
ccall.add_argument (new CCodeIdentifier ("value_index"));
ccall.add_argument (new CCodeIdentifier ("other"));
ccall.add_argument (new CCodeIdentifier ("other_index"));
- value_equal_function.block.add_statement (new CCodeExpressionStatement (ccall));
+ value_equals_function.block.add_statement (new CCodeExpressionStatement (ccall));
- source_type_member_definition.append (value_equal_function);
+ source_type_member_definition.append (value_equals_function);
- declare_set_value_equal_function (source_declarations);
- declare_set_value_equal_function (header_declarations);
- declare_set_value_equal_function (internal_header_declarations);
- source_type_member_definition.append (create_set_value_equal_function ());
+ declare_set_value_equals_function (source_declarations);
+ declare_set_value_equals_function (header_declarations);
+ declare_set_value_equals_function (internal_header_declarations);
+ source_type_member_definition.append (create_set_value_equals_function ());
var value_hash_function = new CCodeFunction ("dova_type_value_hash", "int32_t");
value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
diff --git a/codegen/valadovavaluemodule.vala b/codegen/valadovavaluemodule.vala
index ca0d95e..eaa0c25 100644
--- a/codegen/valadovavaluemodule.vala
+++ b/codegen/valadovavaluemodule.vala
@@ -194,28 +194,28 @@ internal class Vala.DovaValueModule : DovaObjectModule {
source_type_member_definition.append (function);
- if (cl.scope.lookup ("equal") is Method) {
- var value_equal_fun = new CCodeFunction ("%s_value_equal".printf (cl.get_lower_case_cname ()), "bool");
- value_equal_fun.modifiers = CCodeModifiers.STATIC;
- value_equal_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("other", cl.get_cname () + "**"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
- value_equal_fun.block = new CCodeBlock ();
+ if (cl.scope.lookup ("equals") is Method) {
+ var value_equals_fun = new CCodeFunction ("%s_value_equals".printf (cl.get_lower_case_cname ()), "bool");
+ value_equals_fun.modifiers = CCodeModifiers.STATIC;
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("other", cl.get_cname () + "**"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
+ value_equals_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var other = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("other"), new CCodeIdentifier ("other_index"));
- var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_equal".printf (cl.get_lower_case_cname ())));
+ var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_equals".printf (cl.get_lower_case_cname ())));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, val));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, other));
- value_equal_fun.block.add_statement (new CCodeReturnStatement (ccall));
- source_type_member_definition.append (value_equal_fun);
+ value_equals_fun.block.add_statement (new CCodeReturnStatement (ccall));
+ source_type_member_definition.append (value_equals_fun);
- declare_set_value_equal_function (source_declarations);
+ declare_set_value_equals_function (source_declarations);
- var value_equal_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_equal"));
- value_equal_call.add_argument (new CCodeIdentifier ("type"));
- value_equal_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_equal".printf (cl.get_lower_case_cname ())), "bool (*)(void *, int32_t, void *, int32_t)"));
- type_init_fun.block.add_statement (new CCodeExpressionStatement (value_equal_call));
+ var value_equals_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_equals"));
+ value_equals_call.add_argument (new CCodeIdentifier ("type"));
+ value_equals_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_equals".printf (cl.get_lower_case_cname ())), "bool (*)(void *, int32_t, void *, int32_t)"));
+ type_init_fun.block.add_statement (new CCodeExpressionStatement (value_equals_call));
}
if (cl.scope.lookup ("hash") is Method) {
@@ -386,28 +386,28 @@ internal class Vala.DovaValueModule : DovaObjectModule {
value_copy_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_copy".printf (st.get_lower_case_cname ())), "void (*)(void *, int32_t, void *, int32_t)"));
type_init_fun.block.add_statement (new CCodeExpressionStatement (value_copy_call));
- if (st.scope.lookup ("equal") is Method) {
- var value_equal_fun = new CCodeFunction ("%s_value_equal".printf (st.get_lower_case_cname ()), "bool");
- value_equal_fun.modifiers = CCodeModifiers.STATIC;
- value_equal_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("other", st.get_cname () + "*"));
- value_equal_fun.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
- value_equal_fun.block = new CCodeBlock ();
+ if (st.scope.lookup ("equals") is Method) {
+ var value_equals_fun = new CCodeFunction ("%s_value_equals".printf (st.get_lower_case_cname ()), "bool");
+ value_equals_fun.modifiers = CCodeModifiers.STATIC;
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("other", st.get_cname () + "*"));
+ value_equals_fun.add_parameter (new CCodeFormalParameter ("other_index", "int32_t"));
+ value_equals_fun.block = new CCodeBlock ();
var val = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("value"), new CCodeIdentifier ("value_index"));
var other = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, new CCodeIdentifier ("other"), new CCodeIdentifier ("other_index"));
- var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_equal".printf (st.get_lower_case_cname ())));
+ var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_equals".printf (st.get_lower_case_cname ())));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, val));
ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, other));
- value_equal_fun.block.add_statement (new CCodeReturnStatement (ccall));
- source_type_member_definition.append (value_equal_fun);
+ value_equals_fun.block.add_statement (new CCodeReturnStatement (ccall));
+ source_type_member_definition.append (value_equals_fun);
- declare_set_value_equal_function (source_declarations);
+ declare_set_value_equals_function (source_declarations);
- var value_equal_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_equal"));
- value_equal_call.add_argument (new CCodeIdentifier ("type"));
- value_equal_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_equal".printf (st.get_lower_case_cname ())), "bool (*)(void *, int32_t, void *, int32_t)"));
- type_init_fun.block.add_statement (new CCodeExpressionStatement (value_equal_call));
+ var value_equals_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_equals"));
+ value_equals_call.add_argument (new CCodeIdentifier ("type"));
+ value_equals_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_equals".printf (st.get_lower_case_cname ())), "bool (*)(void *, int32_t, void *, int32_t)"));
+ type_init_fun.block.add_statement (new CCodeExpressionStatement (value_equals_call));
}
if (st.scope.lookup ("hash") is Method) {
@@ -641,7 +641,7 @@ internal class Vala.DovaValueModule : DovaObjectModule {
cright = (CCodeExpression) get_ccodenode (expr.right);
}
- var ccall = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_value_equal"));
+ var ccall = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_value_equals"));
ccall.add_argument (get_type_id_expression (generic_type));
ccall.add_argument (cleft);
ccall.add_argument (left_index);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]