diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-12-11 14:28:06 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-12-11 14:28:06 +0000 |
commit | 3226a8894c9f90a96a776fe36456af2cc2d078c7 (patch) | |
tree | 5d1387ede5191c9dc0ca5a1b113642cc04c48d32 /Build/source/texk/kpathsea/hash.h | |
parent | fc101b568d7547030fceb58ab5f097d457d49c57 (diff) |
kpathsea: Resolve some const related problems
git-svn-id: svn://tug.org/texlive/trunk@28500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/hash.h')
-rw-r--r-- | Build/source/texk/kpathsea/hash.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/hash.h b/Build/source/texk/kpathsea/hash.h index 27294eaddf6..d382201d2a4 100644 --- a/Build/source/texk/kpathsea/hash.h +++ b/Build/source/texk/kpathsea/hash.h @@ -1,6 +1,6 @@ /* hash.h: declarations for a hash table. - Copyright 1994, 1995, 2008, 2010, 2011 Karl Berry. + Copyright 1994, 1995, 2008, 2010-2012 Karl Berry. Copyright 1999, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -22,6 +22,12 @@ #include <kpathsea/c-proto.h> #include <kpathsea/types.h> +/* + * The code freeing strings and hash tables is enabled/disabled + * by KPATHSEA_CAN_FREE. + */ +/* At the moment can not free */ +#define KPATHSEA_CAN_FREE 0 /* A single (key,value) pair. */ typedef struct hash_element_struct @@ -65,15 +71,17 @@ extern KPSEDLL void hash_remove (hash_table_type *table, const_string key, /* Look up KEY in TABLE, and return NULL-terminated list of all matching values (not copies), in insertion order. If none, return NULL. */ -extern KPSEDLL string *hash_lookup (hash_table_type table, const_string key); +extern KPSEDLL const_string *hash_lookup (hash_table_type table, const_string key); #ifdef MAKE_KPSE_DLL /* libkpathsea internal only */ /* Print TABLE to stderr. */ extern void hash_print (hash_table_type table, boolean summary_only); +#if KPATHSEA_CAN_FREE /* Drop the TABLE */ extern void hash_free (hash_table_type table); +#endif #endif /* MAKE_KPSE_DLL */ |