vala r2222 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2222 - in trunk: . gobject
- Date: Fri, 19 Dec 2008 14:23:54 +0000 (UTC)
Author: juergbi
Date: Fri Dec 19 14:23:54 2008
New Revision: 2222
URL: http://svn.gnome.org/viewvc/vala?rev=2222&view=rev
Log:
2008-12-19 JÃrg Billeter <j bitron ch>
* gobject/valaccodebasemodule.vala:
Do not use g_error_new for non-format strings, fixes bug 564961
Modified:
trunk/ChangeLog
trunk/gobject/valaccodebasemodule.vala
Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala (original)
+++ trunk/gobject/valaccodebasemodule.vala Fri Dec 19 14:23:54 2008
@@ -2797,7 +2797,12 @@
var edomain = (ErrorDomain) ecode.parent_symbol;
CCodeFunctionCall creation_call;
- creation_call = new CCodeFunctionCall (new CCodeIdentifier ("g_error_new"));
+ if (expr.get_argument_list ().size == 1) {
+ // must not be a format argument
+ creation_call = new CCodeFunctionCall (new CCodeIdentifier ("g_error_new_literal"));
+ } else {
+ creation_call = new CCodeFunctionCall (new CCodeIdentifier ("g_error_new"));
+ }
creation_call.add_argument (new CCodeIdentifier (edomain.get_upper_case_cname ()));
creation_call.add_argument (new CCodeIdentifier (ecode.get_cname ()));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]