From 85348e1178baa5d79380a31072b8f4e65cbe106e Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 23 Jun 2015 15:38:59 -0500 Subject: [PATCH] [fix] enum value conflicted with existing name --- src/geonames.c | 4 ++-- src/geonames.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/geonames.c b/src/geonames.c index 49bca37f..bc20c980 100644 --- a/src/geonames.c +++ b/src/geonames.c @@ -500,7 +500,7 @@ bool geonames_generic_serialize(geonames_generic_t *gn, char_array *str) { return false; } - if (gn->type == GEONAMES_NAME) { + if (gn->type == GEONAMES_PLACE) { return geoname_serialize_ctx(gn->geoname, &ctx); } else if (gn->type == GEONAMES_POSTAL_CODE) { return gn_postal_code_serialize_ctx(gn->postal_code, &ctx); @@ -522,7 +522,7 @@ bool geonames_generic_deserialize(gn_type *type, geoname_t *geoname, gn_postal_c *type = geonames_type; - if (geonames_type == GEONAMES_NAME) { + if (geonames_type == GEONAMES_PLACE) { return geoname_deserialize_ctx(geoname, &ctx); } else if (geonames_type == GEONAMES_POSTAL_CODE) { return gn_postal_code_deserialize_ctx(postal_code, &ctx); diff --git a/src/geonames.h b/src/geonames.h index a62f748a..58a9bdcf 100644 --- a/src/geonames.h +++ b/src/geonames.h @@ -88,7 +88,7 @@ void gn_postal_code_clear(gn_postal_code_t *self); void gn_postal_code_destroy(gn_postal_code_t *self); typedef enum { - GEONAMES_NAME, + GEONAMES_PLACE, GEONAMES_POSTAL_CODE } gn_type;