[gjs] gjs_value_debug_string: Handle old XULRunner
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] gjs_value_debug_string: Handle old XULRunner
- Date: Mon, 13 Jun 2011 18:22:09 +0000 (UTC)
commit 64f78b5810215a12030c25d1ee63003f17113e13
Author: Colin Walters <walters verbum org>
Date: Mon Jun 13 14:09:56 2011 -0400
gjs_value_debug_string: Handle old XULRunner
gjs/jsapi-util.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c
index ac1237f..1dde7e8 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -784,7 +784,12 @@ gjs_string_readable (JSContext *context,
size_t i, len;
const jschar *uchars;
+#ifdef HAVE_JS_GETSTRINGCHARS
+ uchars = JS_GetStringChars(string);
+ len = JS_GetStringLength(string);
+#else
uchars = JS_GetStringCharsAndLength(context, string, &len);
+#endif
for (i = 0; i < len; i++) {
jschar c = uchars[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]