The directory `${CMAKE_CURRENT_SOURCE_DIR}/include` is never created or used. Except in case of an in-source build but then `${CMAKE_CURRENT_BINARY_DIR}/include` would be the same, so it would only duplicate the correct entry.
Not sure if the intermediary `JANSSON__INCLUDE_DIRS` is still necessary but I thought I'd change as little as possible.
The reason for eliminating this is that when you use CLion and sync into a docker container it will try to copy all include dirs back. Non-existant paths cause warnings every time.
Reduce the number of strlen calls in the jansson backend.
Test on my laptop (count of the instructions)
Before:
❯ valgrind --tool=callgrind ./bin/test_object
==3105045== Events : Ir
==3105045== Collected : 441453
After:
❯ valgrind --tool=callgrind ./bin/test_object
==3144451== Events : Ir
==3144451== Collected : 440597
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
This commit added functions working with fixed-size strings (non null-terminated also).
It's helpful for the following cases:
* getting key from substring without copying to separate buffer (better perfomance)
* using pure UTF-8 keys for the objets
* hack: set binary structs as the keys (see test_binary_keys)
added functions:
* json_object_getn
* json_object_setn
* json_object_setn_nocheck
* json_object_setn_new
* json_object_setn_new_nocheck
* json_object_deln
* json_object_iter_key_len
added iterators:
* json_object_keylen_foreach
* json_object_keylen_foreach_safe
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
The Sphinx-3.0 c:function:: directive requires the return type.
Sphinx-3.0 also adds function-like macro support to the c:macro::
directive, which Sphinx-1.x and Sphinx-2.x do not support, but it
is probably a good idea to keep compatibility with slightly older
Sphinx for now.
Use double-backtick quoting instead. It has the same effect
(because these links had nowhere to link to) but it does not
result in loud warnings about broken references by default with Sphinx-3.x.