[libchamplain] Pass an extra argument ($data) through $factory->register($desc, $sub, $data).
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Pass an extra argument ($data) through $factory->register($desc, $sub, $data).
- Date: Tue, 16 Jun 2009 14:30:23 -0400 (EDT)
commit 515d70e0a23d1c4bc9729455851857c25119f874
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Mon Jun 15 23:43:48 2009 +0200
Pass an extra argument ($data) through $factory->register($desc, $sub, $data).
The method register canl now handle an extra data parameter that will be
passed to the constructor.
.../perl/Champlain/xs/ChamplainMapSourceFactory.xs | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs b/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs
index 84d1ba5..d920945 100644
--- a/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs
+++ b/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs
@@ -4,7 +4,6 @@ static GPerlCallback*
champlainperl_constructor_create (SV *func, SV *data) {
GType param_types [] = {
CHAMPLAIN_TYPE_MAP_SOURCE_DESC,
- G_TYPE_POINTER,
};
return gperl_callback_new(
func, data,
@@ -26,7 +25,7 @@ champlainperl_constructor (ChamplainMapSourceDesc *desc, gpointer data) {
g_value_init(&return_value, callback->return_type);
/* FIXME desc is not passed as a Champlain::MapSourceDesc to the perl callback */
- gperl_callback_invoke(callback, &return_value, desc);
+ gperl_callback_invoke(callback, &return_value, desc, callback->data);
retval = g_value_get_object(&return_value);
g_value_unset(&return_value);
@@ -137,7 +136,7 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory, SV *s
CODE:
desc = champlainperl_SvChamplainMapSourceDesc(sv_desc);
- callback = champlainperl_constructor_create(sv_constructor, NULL);
+ callback = champlainperl_constructor_create(sv_constructor, sv_data);
RETVAL = champlain_map_source_factory_register(factory, desc, champlainperl_constructor, callback);
OUTPUT:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]