[gjs] dbus: Add conversion rule for 'q' to JS
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] dbus: Add conversion rule for 'q' to JS
- Date: Fri, 24 Jun 2011 14:29:24 +0000 (UTC)
commit 929d910c73eb3cd4fc1c5be05a889cf841a897d6
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Jun 24 13:15:21 2011 +0100
dbus: Add conversion rule for 'q' to JS
The int16/uint16 type (signature: 'q') is lacking the conversion rule
from DBus value to JavaScript. Easy enough to add.
https://bugzilla.gnome.org/show_bug.cgi?id=653332
modules/dbus-values.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/modules/dbus-values.c b/modules/dbus-values.c
index b33b8c7..f5317e5 100644
--- a/modules/dbus-values.c
+++ b/modules/dbus-values.c
@@ -255,6 +255,20 @@ gjs_js_one_value_from_dbus(JSContext *context,
return JS_NewNumberValue(context, v_BYTE, value_p);
}
break;
+ case DBUS_TYPE_INT16:
+ {
+ dbus_int16_t v_INT16;
+ dbus_message_iter_get_basic(iter, &v_INT16);
+ return JS_NewNumberValue(context, v_INT16, value_p);
+ }
+ break;
+ case DBUS_TYPE_UINT16:
+ {
+ dbus_uint16_t v_UINT16;
+ dbus_message_iter_get_basic(iter, &v_UINT16);
+ return JS_NewNumberValue(context, v_UINT16, value_p);
+ }
+ break;
case DBUS_TYPE_INT32:
{
dbus_int32_t v_INT32;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]