diff options
author | Patrick Pelissier <patrick.pelissier@gmail.com> | 2023-04-27 01:01:50 +0300 |
---|---|---|
committer | Patrick Pelissier <patrick.pelissier@gmail.com> | 2023-04-27 01:01:50 +0300 |
commit | 0a39a17d364f8526580347e9ea4cfbbb6be08ae3 (patch) | |
tree | c931166c41e1b259d2f6b36b9b451f689dad4456 /README.md | |
parent | a913d0947cde93713e952a138c9bb61d0f64f4f3 (diff) |
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.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6851,7 +6851,7 @@ wanted serialization. * data: a table of M\_SERIAL\_MAX\_DATA\_SIZE of C types (Boolean, integer, size or pointer). This data is used to store the needed data for the methods. -This is pretty much like a pure virtual interface object in C++. The interface has to defines +This is pretty much like a pure virtual interface object in C++. The interface has to define the following fields with the following definition: * read\_boolean: @@ -6872,11 +6872,12 @@ the following fields with the following definition: Return M\_SERIAL\_OK\_DONE if it succeeds, M\_SERIAL\_FAIL otherwise * read\_array\_start: Start reading from the stream 'serial' an array (which is defined as a sequential collection of object). - Set '*num' with the number of elements, or 0 if it is not known. + Set '*num' with the number of elements, or (size\_t)-1 if it is not known. Initialize the object 'local' so that it can be used by the serialization object to serialize the array. ('local' is an unique local serialization object of the array). Return M\_SERIAL\_OK\_CONTINUE if it succeeds and the parsing of the array can continue (the array is not empty), M\_SERIAL\_OK\_DONE if it succeeds and the array ends (the array is empty), + M\_SERIAL\_FAIL\_RETRY if it doesn't support unkown number of elements, M\_SERIAL\_FAIL otherwise. * read\_array\_next: Continue reading from the stream 'serial' an array using 'local' to load / save data if needed. |