aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPierce Lopez <pierce.lopez@gmail.com>2020-08-07 02:27:37 -0400
committerPierce Lopez <pierce.lopez@gmail.com>2020-08-07 02:34:25 -0400
commit94318890c0a917bc537381b28adf5a96116d01dc (patch)
tree44288296651c920f0106ef232af1a449edab912b /doc
parent798d40c3f3e0700501de1588274b69e2b128ad7c (diff)
downloadjansson-94318890c0a917bc537381b28adf5a96116d01dc.zip
jansson-94318890c0a917bc537381b28adf5a96116d01dc.tar.gz
jansson-94318890c0a917bc537381b28adf5a96116d01dc.tar.bz2
doc: do not use references for standard C types or file names
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/apiref.rst20
-rw-r--r--doc/upgrading.rst16
2 files changed, 18 insertions, 18 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst
index c3a814f..a793fad 100644
--- a/doc/apiref.rst
+++ b/doc/apiref.rst
@@ -145,7 +145,7 @@ Type
.. function:: int json_typeof(const json_t *json)
Return the type of the JSON value (a :type:`json_type` cast to
- :type:`int`). *json* MUST NOT be *NULL*. This function is actually
+ ``int``). *json* MUST NOT be *NULL*. This function is actually
implemented as a macro for speed.
.. function:: json_is_object(const json_t *json)
@@ -732,11 +732,11 @@ allowed in object keys.
recursively merged with the corresponding values in *object* if they are also
objects, instead of overwriting them. Returns 0 on success or -1 on error.
-.. function:: json_object_foreach(object, key, value)
+.. function:: void json_object_foreach(object, key, value)
Iterate over every key-value pair of ``object``, running the block
of code that follows each time with the proper values set to
- variables ``key`` and ``value``, of types :type:`const char *` and
+ variables ``key`` and ``value``, of types ``const char *`` and
:type:`json_t *` respectively. Example::
/* obj is a JSON object */
@@ -1488,17 +1488,17 @@ arguments.
Output a JSON null value. No argument is consumed.
``b`` (boolean) [int]
- Convert a C :type:`int` to JSON boolean value. Zero is converted
+ Convert a C ``int`` to JSON boolean value. Zero is converted
to ``false`` and non-zero to ``true``.
``i`` (integer) [int]
- Convert a C :type:`int` to JSON integer.
+ Convert a C ``int`` to JSON integer.
``I`` (integer) [json_int_t]
Convert a C :type:`json_int_t` to JSON integer.
``f`` (real) [double]
- Convert a C :type:`double` to JSON real.
+ Convert a C ``double`` to JSON real.
``o`` (any value) [json_t \*]
Output any given JSON value as-is. If the value is added to an
@@ -1625,20 +1625,20 @@ type whose address should be passed.
Expect a JSON null value. Nothing is extracted.
``b`` (boolean) [int]
- Convert a JSON boolean value to a C :type:`int`, so that ``true``
+ Convert a JSON boolean value to a C ``int``, so that ``true``
is converted to 1 and ``false`` to 0.
``i`` (integer) [int]
- Convert a JSON integer to C :type:`int`.
+ Convert a JSON integer to C ``int``.
``I`` (integer) [json_int_t]
Convert a JSON integer to C :type:`json_int_t`.
``f`` (real) [double]
- Convert a JSON real to C :type:`double`.
+ Convert a JSON real to C ``double``.
``F`` (integer or real) [double]
- Convert a JSON number (integer or real) to C :type:`double`.
+ Convert a JSON number (integer or real) to C ``double``.
``o`` (any value) [json_t \*]
Store a JSON value with no conversion to a :type:`json_t` pointer.
diff --git a/doc/upgrading.rst b/doc/upgrading.rst
index 9b49046..94ff7de 100644
--- a/doc/upgrading.rst
+++ b/doc/upgrading.rst
@@ -47,13 +47,13 @@ List of Incompatible Changes
**Underlying type of JSON integers**
The underlying C type of JSON integers has been changed from
- :type:`int` to the widest available signed integer type, i.e.
- :type:`long long` or :type:`long`, depending on whether
- :type:`long long` is supported on your system or not. This makes
+ ``int`` to the widest available signed integer type, i.e.
+ ``long long`` or ``long``, depending on whether
+ ``long long`` is supported on your system or not. This makes
the whole 64-bit integer range available on most modern systems.
``jansson.h`` has a typedef :type:`json_int_t` to the underlying
- integer type. :type:`int` should still be used in most cases when
+ integer type. ``int`` should still be used in most cases when
dealing with smallish JSON integers, as the compiler handles
implicit type coercion. Only when the full 64-bit range is needed,
:type:`json_int_t` should be explicitly used.
@@ -69,8 +69,8 @@ List of Incompatible Changes
**Unsigned integers in API functions**
Version 2.0 unifies unsigned integer usage in the API. All uses of
- :type:`unsigned int` and :type:`unsigned long` have been replaced
- with :type:`size_t`. This includes flags, container sizes, etc.
+ ``unsigned int`` and ``unsigned long`` have been replaced
+ with ``size_t``. This includes flags, container sizes, etc.
This should not require source code changes, as both
- :type:`unsigned int` and :type:`unsigned long` are usually
- compatible with :type:`size_t`.
+ ``unsigned int`` and ``unsigned long`` are usually
+ compatible with ``size_t``.