X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=gmqcc.h;h=7533bb43ee2d09d8bb50dd68178c29c0c5052adc;hp=8cf2a839bda7c9f353e98683dbb0d93bb2d36d4c;hb=ca52ecc20af641a20b3d3cdb0921f55c27541491;hpb=613e1e7247c8dd271979b9e9d70ff7735ef5282b diff --git a/gmqcc.h b/gmqcc.h index 8cf2a83..7533bb4 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -270,32 +270,32 @@ typedef struct hash_table_t { /* * hashtable implementation: - * + * * Note: * This was designed for pointers: you manage the life of the object yourself * if you do use this for non-pointers please be warned that the object may not * be valid if the duration of it exceeds (i.e on stack). So you need to allocate * yourself, or put those in global scope to ensure duration is for the whole * runtime. - * + * * util_htnew(size) -- to make a new hashtable * util_htset(table, key, value, sizeof(value)) -- to set something in the table * util_htget(table, key) -- to get something from the table * util_htdel(table) -- to delete the table - * + * * example of use: - * + * * ht foo = util_htnew(1024); * int data = 100; * char *test = "hello world\n"; * util_htset(foo, "foo", (void*)&data); * util_gtset(foo, "bar", (void*)test); - * + * * printf("foo: %d, bar %s", * *((int *)util_htget(foo, "foo")), * ((char*)util_htget(foo, "bar")) * ); - * + * * util_htdel(foo); */ hash_table_t *util_htnew (size_t size);