source_declarations.add_type_member_declaration (value_equals_function);
- var value_hash_function = new CCodeFunction ("dova_type_value_hash", "int32_t");
+ var value_hash_function = new CCodeFunction ("dova_type_value_hash", "uint32_t");
value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
value_hash_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
value_hash_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
vdeclarator.add_parameter (new CCodeFormalParameter ("value", "void *"));
vdeclarator.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
- vdecl = new CCodeDeclaration ("int32_t");
+ vdecl = new CCodeDeclaration ("uint32_t");
vdecl.add_declarator (vdeclarator);
instance_priv_struct.add_declaration (vdecl);
CCodeFunction create_set_value_hash_function (bool decl_only = false) {
var result = new CCodeFunction ("dova_type_set_value_hash");
result.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
- result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, int32_t value_index)", "int32_t"));
+ result.add_parameter (new CCodeFormalParameter ("(*function) (void *value, int32_t value_index)", "uint32_t"));
if (decl_only) {
return result;
}
declare_set_value_equals_function (header_declarations);
source_type_member_definition.append (create_set_value_equals_function ());
- var value_hash_function = new CCodeFunction ("dova_type_value_hash", "int32_t");
+ var value_hash_function = new CCodeFunction ("dova_type_value_hash", "uint32_t");
value_hash_function.add_parameter (new CCodeFormalParameter ("type", "DovaType *"));
value_hash_function.add_parameter (new CCodeFormalParameter ("value", "void *"));
value_hash_function.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
}
if (cl.scope.lookup ("hash") is Method) {
- var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (cl.get_lower_case_cname ()), "int32_t");
+ var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (cl.get_lower_case_cname ()), "uint32_t");
value_hash_fun.modifiers = CCodeModifiers.STATIC;
value_hash_fun.add_parameter (new CCodeFormalParameter ("value", cl.get_cname () + "**"));
value_hash_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
var value_hash_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_hash"));
value_hash_call.add_argument (new CCodeIdentifier ("type"));
- value_hash_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_hash".printf (cl.get_lower_case_cname ())), "int32_t (*)(void *, int32_t)"));
+ value_hash_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_hash".printf (cl.get_lower_case_cname ())), "uint32_t (*)(void *, int32_t)"));
type_init_fun.block.add_statement (new CCodeExpressionStatement (value_hash_call));
}
}
if (st.scope.lookup ("hash") is Method) {
- var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (st.get_lower_case_cname ()), "int32_t");
+ var value_hash_fun = new CCodeFunction ("%s_value_hash".printf (st.get_lower_case_cname ()), "uint32_t");
value_hash_fun.modifiers = CCodeModifiers.STATIC;
value_hash_fun.add_parameter (new CCodeFormalParameter ("value", st.get_cname () + "*"));
value_hash_fun.add_parameter (new CCodeFormalParameter ("value_index", "int32_t"));
var value_hash_call = new CCodeFunctionCall (new CCodeIdentifier ("dova_type_set_value_hash"));
value_hash_call.add_argument (new CCodeIdentifier ("type"));
- value_hash_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_hash".printf (st.get_lower_case_cname ())), "int32_t (*)(void *, int32_t)"));
+ value_hash_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("%s_value_hash".printf (st.get_lower_case_cname ())), "uint32_t (*)(void *, int32_t)"));
type_init_fun.block.add_statement (new CCodeExpressionStatement (value_hash_call));
}