summaryrefslogtreecommitdiff
path: root/linkhash.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in code comments and ChangeLogEven Rouault2022-02-251-1/+1
|
* Add linkhash accessor functions (lh_table_head(), lh_entry_next(), etc...) ↵Eric Haszlakiewicz2021-11-301-12/+90
| | | | | | | to pave the way for making the lh_table and lh_entry structure opaque in the future. Update the docs to mark all members of those structures deprecated, and suggest what to use instead.
* Really use prefix JSON_C_OBJECT_ADD_*José Bollo2021-10-191-1/+1
| | | | | | | | | | | | | | This change introduces JSON_C_OBJECT_ADD_CONSTANT_KEY as a replacement of JSON_C_OBJECT_KEY_IS_CONSTANT. The description of json_object_object_add_ex tells to look at the flags JSON_C_OBJECT_ADD_* but it is not for JSON_C_OBJECT_KEY_IS_CONSTANT. From the point of vue of a developper using json-c, the function json_object_object_add_ex is mainly used, not the hash facility, it seems more natural to provide a regular naming of prefix JSON_C_OBJECT_ADD_CONSTANT_KEY.
* Issue #709: adjust some include guards to be a bit more json-c specific.Eric Haszlakiewicz2021-06-021-2/+2
|
* Apply the fix from @pointbre in issue #626 to skip "inline" on AIX, but ↵Eric Haszlakiewicz2020-05-311-3/+3
| | | | invert the test to make it a little easier to understand.
* clang-format the filesdota172020-04-031-32/+20
|
* Remove the previously deprecated lh_table_lookup() function, in favor of ↵Eric Haszlakiewicz2017-12-101-10/+0
| | | | lh_table_lookup_ex().
* Remove the previously deprecated bits.h and the lh_abort() function.Eric Haszlakiewicz2017-12-101-15/+0
|
* Undeprecate the array_list, lh_table and printbuf typedefs, but move each to ↵Eric Haszlakiewicz2017-12-061-0/+1
| | | | the corresponding header files.
* Squash doxygen warnings, and make a few slight improvements to the docs.Eric Haszlakiewicz2017-12-061-27/+51
|
* Add a brief overview of each file to the docs.Eric Haszlakiewicz2017-12-061-0/+6
|
* Issue#353: mark lh_abort as actually deprecated, not just in the docs.Eric Haszlakiewicz2017-09-071-4/+4
|
* Issue #359: Don't duplicate lh_get_hash, just omit the "inline" for VS2010.Eric Haszlakiewicz2017-09-061-8/+13
|
* if compile with vs2015, enable the "static inline" declare.Haffon2017-09-071-0/+7
|
* 1.make it can been compiled with Visual Studio 2010Haffon2017-08-221-4/+1
| | | | | 2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx. 3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
* Support for 64 bit pointers on Windowspepevel2016-09-271-2/+2
|
* linkhash.h: removed redundant params from commentsEswar Yaganti2016-06-251-2/+0
|
* Issue #236: Add -Wcast-qual and fix casts to retain constness.Eric Haszlakiewicz2016-06-111-5/+31
| | | | | To better distinguish between entry->k and entry->v being const within linkhash, but non-const outside, add lh_entry_v() and lh_entry_k() accessors. Make lh_entry->k const.
* Merge commit '2be921d88376e78f84d79aafa6db2714da804e59'Eric Haszlakiewicz2015-12-081-4/+33
|\
| * Fixed json_object_object_add().Alexander Klauer2013-01-081-5/+33
| | | | | | | | | | | | | | | | | | * Return value of json_object_object_add() changed from void to int. Return value now indicates success or failure. * Check whether allocations are successful. * Do not exit program from within the library.
* | Merge pull request #196 from rgerhards/improve-performanceEric Haszlakiewicz2015-09-281-44/+65
|\ \ | | | | | | Performance improvements
| * | remove unneeded data items from hashtable codeRainer Gerhards2015-09-231-34/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These items were used for statistics tracking, but no code at all exists to consume them. By removing them we save a) space because they counters required space, and did so in each and every json object b) performance because calloc() needs to write less data and the counters are no longer maintained; cache performance can be better, load on OS main memory is lighter We could conditionally enable/disable these counters, but I have not done this they were really nowhere used and it looked more like a left-over from the import of hashtable code.
| * | add perllike hash function for stringsRainer Gerhards2015-09-231-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This also adds a new API json_global_set_string_hash() which permits to select the hash function. The default one is the only one that was previously present. So there are no changes to existing apps, and the new hash function needs to be explicitely be opted in. Especially for smaller strings, the perllike functions seems to be around twice as fast as the other one, with similarly good results in value distribution.
| * | add json_object_object_add_ex() APIRainer Gerhards2015-09-231-1/+3
| | | | | | | | | | | | | | | This provides more control over some detail aspects, many of which are performance related.
| * | reduce duplicate hash computation in json_object_object_add()Rainer Gerhards2015-09-221-0/+43
| | | | | | | | | | | | This can be a very considerable performance saver.
* | | Remove trailing whitespaceMichael Vetter2014-08-261-2/+2
|/ /
* | Patch to address the following issues:Michael Clark2014-04-091-1/+1
| | | | | | | | | | * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
* | add json_object_object_lengthGreg Hazel2013-01-111-0/+1
|/
* Add NULL-safe lookup functionKeith Derrick2012-04-121-0/+12
| | | | | New lh_table_lookup_ex() method protects itself against null pointers and invalid objects being passed in.
* Define a LH_LOAD_FACTOR constant and note the range that it can be set to.Eric Haszlakiewicz2012-03-311-0/+7
| | | | | Change the resize check from "count > size" to "count >= size" to avoid a potential infinite loop with high load factors and a full hash table.
* * Don't use this as a variable, so we can compile with a C++ compilerMichael Clark2009-02-251-0/+8
| | | | | | | | | | * Add casts from void* to type of assignment when using malloc * Add #ifdef __cplusplus guards to all of the headers * Add typedefs for json_object, json_tokener, array_list, printbuf, lh_table Michael Clark, <michael@metaparadigm.com> git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@33 327403b1-1117-474d-bef2-5cb71233fd97
* Add const correctness to public interfacesMichael Clark2009-01-061-15/+15
| | | | | | | | | | Gerard Krol, g dot c dot krol at student dot tudelft dot nl Update version number to 0.9 git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@27 327403b1-1117-474d-bef2-5cb71233fd97
* Patch allows for json-c compile with -Werror and not fail due toMichael Clark2007-12-071-0/+3
| | | | | | | | | -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations Geoffrey Young, geoff at modperlcookbook dot org git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@20 327403b1-1117-474d-bef2-5cb71233fd97
* * Fix bug in escaping of control charactersMichael Clark2007-03-131-3/+1
| | | | | | | | | | Johan Bj�rklund, johbjo09 at kth dot se * Remove include "config.h" from headers (should only be included from .c files) Michael Clark <michael@metaparadigm.com> git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@12 327403b1-1117-474d-bef2-5cb71233fd97
* * Make headers C++ compatible by change *this to *objMichael Clark2007-03-131-11/+4
| | | | | | | | | | | | | | | * Add ifdef C++ extern "C" to headers * Use simpler definition of min and max in bits.h Larry Lansing, llansing at fuzzynerd dot com * Remove automake 1.6 requirement * Move autogen commands into autogen.sh. Update README * Remove error pointer special case for Windows * Change license from LGPL to MIT Michael Clark <michael@metaparadigm.com> git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@10 327403b1-1117-474d-bef2-5cb71233fd97
* * printbuf.c - C. Watford (christopher dot watford at gmail dot com)Michael Clark2007-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Added a Win32/Win64 compliant implementation of vasprintf * debug.c - C. Watford (christopher dot watford at gmail dot com) Removed usage of vsyslog on Win32/Win64 systems, needs to be handled by a configure script * json_object.c - C. Watford (christopher dot watford at gmail dot com) Added scope operator to wrap usage of json_object_object_foreach, this needs to be rethought to be more ANSI C friendly * json_object.h - C. Watford (christopher dot watford at gmail dot com) Added Microsoft C friendly version of json_object_object_foreach * json_tokener.c - C. Watford (christopher dot watford at gmail dot com) Added a Win32/Win64 compliant implementation of strndup * json_util.c - C. Watford (christopher dot watford at gmail dot com) Added cast and mask to suffice size_t v. unsigned int conversion correctness * json_tokener.c - sign reversal issue on error info for nested object parse spotted by Johan Bj�rklund (johbjo09 at kth.se) * json_object.c - escape " in json_escape_str * Change to automake and libtool to build shared and static library Michael Clark <michael@metaparadigm.com> git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@4 327403b1-1117-474d-bef2-5cb71233fd97
* import of version 0.1Michael Clark2007-03-131-0/+270
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@2 327403b1-1117-474d-bef2-5cb71233fd97