champlainperl_constructor_create (SV *func, SV *data) {
GType param_types [] = {
CHAMPLAIN_TYPE_MAP_SOURCE_DESC,
- G_TYPE_POINTER,
};
return gperl_callback_new(
func, 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);
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: