diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-11-30 19:27:17 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-11-30 23:47:53 +0100 |
commit | a75f2461db03198d624410434d253dee502c65d7 (patch) | |
tree | 2a82921b9d15aa60458abe742a946add4e5eb7ec /vala/valamethodcall.vala | |
parent | 359774c0d9d4c8941f0d7a6e063ad0b549a0ad6d (diff) | |
download | vala-a75f2461db03198d624410434d253dee502c65d7.tar.gz |
methodcall: Don't try to remove N_/NC_ while they are properly handled in C
This avoids messing around with the ownership and properly invokes copying
if needed.
https://bugzilla.gnome.org/show_bug.cgi?id=642350
Diffstat (limited to 'vala/valamethodcall.vala')
-rw-r--r-- | vala/valamethodcall.vala | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index 7bf0e49c3..4e9d474da 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -672,25 +672,6 @@ public class Vala.MethodCall : Expression { public override void emit (CodeGenerator codegen) { var method_type = call.value_type as MethodType; - if (method_type != null) { - // N_ and NC_ do not have any effect on the C code, - // they are only interpreted by xgettext - // this means that it is ok to use them in constant initializers - // however, we must avoid generating regular method call code - // as that may include temporary variables - if (method_type.method_symbol.get_full_name () == "GLib.N_") { - // first argument is string - argument_list[0].emit (codegen); - this.target_value = argument_list[0].target_value; - return; - } else if (method_type.method_symbol.get_full_name () == "GLib.NC_") { - // second argument is string - argument_list[1].emit (codegen); - this.target_value = argument_list[1].target_value; - return; - } - } - if (method_type != null && method_type.method_symbol.parent_symbol is Signal) { var signal_access = ((MemberAccess) call).inner; signal_access.emit (codegen); |