summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-03-02 10:26:26 +0000
committerPhilip Withnall <withnall@endlessm.com>2017-05-02 16:59:50 +0100
commit404c2d24542d5306aa579cfc43470e789306866e (patch)
tree9d568bf551f7de39780e39946b622fcf4cf1be38
parentf6f6b3d83c2abae8aac55c59339adcee919ab6e5 (diff)
downloadglib-404c2d24542d5306aa579cfc43470e789306866e.tar.gz
ghash: Document that GHashTable is not suitable for static hash tables
Instead, gperf should be used for that kind of thing. Inspired by http://stackoverflow.com/q/42372382/2931197. Signed-off-by: Philip Withnall <withnall@endlessm.com>
-rw-r--r--glib/ghash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/ghash.c b/glib/ghash.c
index 9afa121d9..01c495e53 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -89,6 +89,10 @@
* space saving, if your set is large. The functions
* g_hash_table_add() and g_hash_table_contains() are designed to be
* used when using #GHashTable this way.
+ *
+ * #GHashTable is not designed to be statically initialised with keys and
+ * values known at compile time. To build a static hash table, use a tool such
+ * as [gperf](https://www.gnu.org/software/gperf/).
*/
/**