]> err.no Git - libchamplain/commitdiff
Fix the name of OSM_CYCLE_MAP
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Tue, 5 May 2009 14:20:03 +0000 (16:20 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Wed, 6 May 2009 03:16:03 +0000 (23:16 -0400)
bindings/perl/Champlain/t/ChamplainMapSourceFactory.t
bindings/perl/Champlain/xs/ChamplainMapSourceFactory.xs

index 1dbbe2b6fb37f1364a028d32ccc2d8da50183bde..b1a9845eb559f8de9c1686f2a61e8bde7ad96bc5 100644 (file)
@@ -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);
        
index 4e02ac969c7551533dd0d1a0b566d0288003b3b9..1346b5af346131a219a832b8a0d00e5d2ef2f3b4 100644 (file)
@@ -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