[gjs] [value] Do not use G_TYPE_ARRAY as well
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] [value] Do not use G_TYPE_ARRAY as well
- Date: Tue, 22 Jun 2010 19:19:30 +0000 (UTC)
commit 85c314acca416d965156e633e9583d50f6de7733
Author: Johan Dahlin <johan gnome org>
Date: Tue Jun 22 16:19:22 2010 -0300
[value] Do not use G_TYPE_ARRAY as well
gi/value.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gi/value.c b/gi/value.c
index 0d84593..67440dd 100644
--- a/gi/value.c
+++ b/gi/value.c
@@ -36,6 +36,7 @@
#include <girepository.h>
+static GType _array_type = G_TYPE_INVALID;
static GType _byte_array_type = G_TYPE_INVALID;
static GType _ptr_array_type = G_TYPE_INVALID;
@@ -577,7 +578,7 @@ gjs_value_from_g_value_internal(JSContext *context,
return JS_FALSE;
}
} else if (g_type_is_a(gtype, G_TYPE_HASH_TABLE) ||
- g_type_is_a(gtype, G_TYPE_ARRAY) ||
+ g_type_is_a(gtype, _array_type) ||
g_type_is_a(gtype, _byte_array_type) ||
g_type_is_a(gtype, _ptr_array_type)) {
gjs_throw(context,
@@ -680,6 +681,7 @@ gjs_value_from_g_value(JSContext *context,
__attribute__((constructor)) void
_gjs_value_init_types(void)
{
+ _array_type = g_type_from_name("GArray");
_byte_array_type = g_type_from_name("GByteArray");
_ptr_array_type = g_type_from_name("GPtrArray");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]