The undefined number of element value of serial _array_start

is now (size_t)-1 and no longer 0.
Moreoever, a serialization interface may refuse outputting data
if it doesn't know the number of elements.
In which case, the container shall explictly compute the number
of elements and recall the serial object _array_start method.
This commit is contained in:
Patrick Pelissier committed 2023-04-27 00:01:50 +02:00
1 parent a913d0947c
commit 0a39a17d36
3 files changed
+10 -4

No files matched your search

+2 -1
View File
@@ -4881,9 +4881,10 @@ struct m_string_s;
* - OK & done (object is fully parsed),
* - OK & continue parsing (object is partially parsed)
* - Fail parsing
* - Fail parsing with given arguments (give explicit size)
*/
typedef enum m_serial_return_code_e {
M_SERIAL_OK_DONE = 0, M_SERIAL_OK_CONTINUE = 1, M_SERIAL_FAIL = 2
M_SERIAL_OK_DONE = 0, M_SERIAL_OK_CONTINUE = 1, M_SERIAL_FAIL = 2, M_SERIAL_FAIL_RETRY = 4
} m_serial_return_code_t;
#if defined(__cplusplus)