From: Emmanuel Rodriguez Date: Tue, 5 May 2009 14:20:03 +0000 (+0200) Subject: Fix the name of OSM_CYCLE_MAP X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1deccc86f6d9fabc4ed6718c965d26cfe84567f5;p=libchamplain Fix the name of OSM_CYCLE_MAP --- diff --git a/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t b/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t index 1dbbe2b..b1a9845 100644 --- a/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t +++ b/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t @@ -22,7 +22,7 @@ sub test_map_source_names { # Map identification is(Champlain::MapSourceFactory->OSM_MAPNIK, 'OpenStreetMap Mapnik'); is(Champlain::MapSourceFactory->OSM_OSMARENDER, 'OpenStreetMap Osmarender'); - is(Champlain::MapSourceFactory->OSM_CYCLEMAP, 'OpenStreetMap CycleMap'); + is(Champlain::MapSourceFactory->OSM_CYCLE_MAP, 'OpenStreetMap CycleMap'); is(Champlain::MapSourceFactory->OAM, 'OpenAerialMap'); is(Champlain::MapSourceFactory->MFF_RELIEF, 'MapsForFree Relief'); } @@ -35,7 +35,7 @@ sub test_map_factory { generic_create($factory, Champlain::MapSourceFactory->OSM_MAPNIK); generic_create($factory, Champlain::MapSourceFactory->OSM_OSMARENDER); - generic_create($factory, Champlain::MapSourceFactory->OSM_CYCLEMAP); + generic_create($factory, Champlain::MapSourceFactory->OSM_CYCLE_MAP); generic_create($factory, Champlain::MapSourceFactory->OAM); generic_create($factory, Champlain::MapSourceFactory->MFF_RELIEF); diff --git a/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs b/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs index 4e02ac9..1346b5a 100644 --- a/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs +++ b/bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs @@ -12,20 +12,18 @@ champlain_map_source_factory_get_default (class) void champlain_map_source_factory_get_list (ChamplainMapSourceFactory *factory) PREINIT: - gchar **list = NULL; - gchar *item = NULL; - gint i = 0; + GSList *list = NULL; + GSList *item = NULL; PPCODE: list = champlain_map_source_factory_get_list(factory); - item = list[0]; - while (item != NULL) { - XPUSHs(sv_2mortal(newSVGChar(item))); - item = list[++i]; + for (item = list; item != NULL; item = item->next) { +// ChamplainMapSourceDesc *desc = CHAMAPLAIN_MAP_SOURCE_DESC(item->data); +// XPUSHs(sv_2mortal(newSVChamplainMapSourceDesc(desc))); } - g_strfreev(list); + g_slist_free(list); ChamplainMapSource* @@ -55,9 +53,9 @@ OSM_OSMARENDER (class) const gchar* -OSM_CYCLEMAP (class) +OSM_CYCLE_MAP (class) CODE: - RETVAL = CHAMPLAIN_MAP_SOURCE_OSM_CYCLEMAP; + RETVAL = CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP; OUTPUT: RETVAL