[gjs] gi: Fix two compiler warnings
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] gi: Fix two compiler warnings
- Date: Fri, 3 Dec 2010 21:55:28 +0000 (UTC)
commit 0ba1c597007e5789b475e65695ea0f0f6b0d44a4
Author: Colin Walters <walters verbum org>
Date: Fri Dec 3 16:54:59 2010 -0500
gi: Fix two compiler warnings
The use of gjs_throw was wrong in the first case. In the second,
we rely on implicit address-of for C array passing.
gi/arg.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 121d82a..b79f743 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -1668,11 +1668,12 @@ gjs_value_from_g_argument (JSContext *context,
if (arg->v_uint32 == 0) {
return gjs_string_from_utf8 (context, "", 0, value_p);
} else if (!g_unichar_validate (arg->v_uint32)) {
- gjs_throw("Invalid unicode codepoint %" G_GUINT32_FORMAT,
+ gjs_throw(context,
+ "Invalid unicode codepoint %" G_GUINT32_FORMAT,
arg->v_uint32);
return JS_FALSE;
} else {
- bytes = g_unichar_to_utf8 (arg->v_uint32, &utf8);
+ bytes = g_unichar_to_utf8 (arg->v_uint32, utf8);
return gjs_string_from_utf8 (context, (char*)utf8, bytes, value_p);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]