From cf30376bd9e43ad653c6292f275ee4dd10b70a6c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 30 Nov 2007 11:42:04 +0000 Subject: [PATCH] Use oid_class rather than int for OID class. Changed oclass parameter for yaz_oid_add function from type int to enum oid_class. This should not break binary compatibility. Changed oid member in struct yaz_oid_entry to enum oid_class. --- include/yaz/oid_db.h | 6 +++--- src/oid_db.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/yaz/oid_db.h b/include/yaz/oid_db.h index 5913f4a..fb0304d 100644 --- a/include/yaz/oid_db.h +++ b/include/yaz/oid_db.h @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: oid_db.h,v 1.9 2007-06-24 19:27:11 adam Exp $ */ +/* $Id: oid_db.h,v 1.10 2007-11-30 11:42:04 adam Exp $ */ /** * \file oid_db.h @@ -168,7 +168,7 @@ int yaz_oid_is_iso2709(const Odr_oid *oid); \retval -1 OID name+oclass already exists */ YAZ_EXPORT -int yaz_oid_add(yaz_oid_db_t oid_db, int oclass, const char *name, +int yaz_oid_add(yaz_oid_db_t oid_db, oid_class oclass, const char *name, const Odr_oid *new_oid); @@ -185,7 +185,7 @@ YAZ_EXPORT void yaz_oid_db_destroy(yaz_oid_db_t oid_db); struct yaz_oid_entry { - int oclass; + enum oid_class oclass; const Odr_oid *oid; char *name; }; diff --git a/src/oid_db.c b/src/oid_db.c index 2ea139d..60d3e54 100644 --- a/src/oid_db.c +++ b/src/oid_db.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: oid_db.c,v 1.9 2007-06-24 19:27:12 adam Exp $ + * $Id: oid_db.c,v 1.10 2007-11-30 11:42:04 adam Exp $ */ /** @@ -126,7 +126,7 @@ int yaz_oid_is_iso2709(const Odr_oid *oid) return 0; } -int yaz_oid_add(yaz_oid_db_t oid_db, int oclass, const char *name, +int yaz_oid_add(yaz_oid_db_t oid_db, oid_class oclass, const char *name, const Odr_oid *new_oid) { const Odr_oid *oid = yaz_string_to_oid(oid_db, oclass, name); -- 1.7.10.4