var target_var = new LocalVariable (new PointerType (new VoidType ()), get_delegate_target_cname (get_variable_cname (local.name)));
emit_temp_var (target_var);
if (deleg_type.value_owned) {
- var target_destroy_notify_var = new LocalVariable (new DelegateType ((Delegate) context.root.scope.lookup ("GLib").scope.lookup ("DestroyNotify")), get_delegate_target_destroy_notify_cname (get_variable_cname (local.name)));
+ var target_destroy_notify_var = new LocalVariable (gdestroynotify_type, get_delegate_target_destroy_notify_cname (get_variable_cname (local.name)));
emit_temp_var (target_destroy_notify_var);
}
}
} else if (expression_type is DelegateType && expr != null) {
var target_decl = new LocalVariable (new PointerType (new VoidType ()), get_delegate_target_cname (decl.name));
emit_temp_var (target_decl);
- var target_destroy_notify_decl = new LocalVariable (new DelegateType ((Delegate) context.root.scope.lookup ("GLib").scope.lookup ("DestroyNotify")), get_delegate_target_destroy_notify_cname (decl.name));
+ var target_destroy_notify_decl = new LocalVariable (gdestroynotify_type, get_delegate_target_destroy_notify_cname (decl.name));
emit_temp_var (target_destroy_notify_decl);
CCodeExpression target_destroy_notify;
ccode.add_expression (new CCodeAssignment (get_variable_cexpression (target_decl.name), get_delegate_target_cexpression (expr, out target_destroy_notify)));
set_delegate_target (arg, get_variable_cexpression (temp_var.name));
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_delegate_target (arg)));
if (deleg_type.value_owned) {
- temp_var = get_temp_variable (new DelegateType ((Delegate) context.root.scope.lookup ("GLib").scope.lookup ("DestroyNotify")));
+ temp_var = get_temp_variable (gdestroynotify_type);
emit_temp_var (temp_var);
set_delegate_target_destroy_notify (arg, get_variable_cexpression (temp_var.name));
carg_map.set (get_param_pos (param.cdelegate_target_parameter_position + 0.01), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_delegate_target_destroy_notify (arg)));
set_delegate_target (expr, temp_ref);
if (deleg_type.value_owned) {
- temp_var = get_temp_variable (new DelegateType ((Delegate) context.root.scope.lookup ("GLib").scope.lookup ("DestroyNotify")));
+ temp_var = get_temp_variable (gdestroynotify_type);
temp_ref = get_variable_cexpression (temp_var.name);
emit_temp_var (temp_var);