+2008-12-16 Jürg Billeter <j@bitron.ch>
+
+ * gobject/valaccodebasemodule.vala:
+ * gobject/valaccodemethodmodule.vala:
+
+ Fix temporary variable handling when using methods defined in
+ VAPI files
+
2008-12-16 Jürg Billeter <j@bitron.ch>
* vapigen/valagidlparser.vala:
public Set<string> wrappers;
- Map<string,string> variable_name_map = new HashMap<string,string> (str_hash, str_equal);
+ public Map<string,string> variable_name_map = new HashMap<string,string> (str_hash, str_equal);
public CCodeBaseModule (CCodeGenerator codegen, CCodeModule? next) {
base (codegen, next);
user_marshal_set = new HashSet<string> (str_hash, str_equal);
next_temp_var_id = 0;
+ variable_name_map.clear ();
string_h_needed = false;
gvaluecollector_h_needed = false;
check_type (prop.property_type);
int old_next_temp_var_id = next_temp_var_id;
+ var old_variable_name_map = variable_name_map;
next_temp_var_id = 0;
+ variable_name_map = new HashMap<string,string> (str_hash, str_equal);
prop.accept_children (codegen);
next_temp_var_id = old_next_temp_var_id;
+ variable_name_map = old_variable_name_map;
var cl = prop.parent_symbol as Class;
if (cl != null && cl.is_subtype_of (gobject_type)
DataType old_return_type = current_return_type;
bool old_method_inner_error = current_method_inner_error;
int old_next_temp_var_id = next_temp_var_id;
+ var old_variable_name_map = variable_name_map;
if (m.parent_symbol is TypeSymbol) {
current_type_symbol = (TypeSymbol) m.parent_symbol;
}
current_return_type = m.return_type;
current_method_inner_error = false;
next_temp_var_id = 0;
+ variable_name_map = new HashMap<string,string> (str_hash, str_equal);
bool in_gtypeinstance_creation_method = false;
bool in_gobject_creation_method = false;
current_return_type = old_return_type;
current_method_inner_error = old_method_inner_error;
next_temp_var_id = old_next_temp_var_id;
+ variable_name_map = old_variable_name_map;
function = new CCodeFunction (m.get_real_cname (), get_creturn_type (m, creturn_type.get_cname ()));
m.ccodenode = function;