[gjs] context: Use G_TYPE_STRV for search-path
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] context: Use G_TYPE_STRV for search-path
- Date: Fri, 10 Dec 2010 19:19:39 +0000 (UTC)
commit 178c4d9443058698497224aaf507e834055f20ed
Author: Colin Walters <walters verbum org>
Date: Fri Dec 3 17:13:43 2010 -0500
context: Use G_TYPE_STRV for search-path
No reason to use a pointer, there's a GObject boxed for char **.
https://bugzilla.gnome.org/show_bug.cgi?id=636652
gjs/context.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gjs/context.c b/gjs/context.c
index bdcf586..e52448a 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -298,10 +298,11 @@ gjs_context_class_init(GjsContextClass *klass)
object_class->get_property = gjs_context_get_property;
object_class->set_property = gjs_context_set_property;
- pspec = g_param_spec_pointer("search-path",
- "Search path",
- "Path where modules to import should reside",
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
+ pspec = g_param_spec_boxed("search-path",
+ "Search path",
+ "Path where modules to import should reside",
+ G_TYPE_STRV,
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class,
PROP_SEARCH_PATH,
@@ -673,7 +674,7 @@ gjs_context_set_property (GObject *object,
switch (prop_id) {
case PROP_SEARCH_PATH:
- js_context->search_path = g_strdupv(g_value_get_pointer(value));
+ js_context->search_path = g_value_dup_boxed(value);
break;
case PROP_RUNTIME:
js_context->runtime = g_value_get_pointer(value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]