Update doc to add _parse_str method

This commit is contained in:
Patrick Pelissier committed 2018-05-03 17:51:36 +02:00
1 parent 188b329eae
commit 6af34b1c16
1 file changed
+1
+1
View File
@@ -455,6 +455,7 @@ Other documented operators are:
* OUT\_STR(FILE* f, obj): Output 'obj' as a string into the FILE stream 'f'.
* IN\_STR(obj, FILE* f) --> bool: Set 'obj' to the string object in the FILE stream 'f'. Return true in case of success (in which case the stream 'f' has been advanced to the end of the parsing of the object), false otherwise (in which case, the stream 'f' is in an indetermined position).
* GET\_STR(string_t str, obj, bool append): Set 'str' to a string representation of the object 'obj'. Append to the string if 'append' is true, set it otherwise.
* PARSE\_STR(obj, const char str[], const char **endp) --> bool: Set 'obj' to the string object in the char stream 'str'. Return true in case of success (in which case if endp is not NULL, it points to the end of the parsing of the object), false otherwise (in which case, if endp is not NULL, it points to an indetermined position).
* UPDATE(dest, src): Update 'dest' with 'src'. What it does exactly is node dependent: it can either SET or ADD to the node the new 'src' (default is SET).
* OOR\_SET(obj, int\_value): some containers may want to store some information within some uninitialized objects (for example Open Addressing Hash Table). This method will store the integer value 'int\_value' into the uninitialized object 'obj'. The way to store this information is object dependent. In general, you use out-of-range value for detecting such values. The object remains unitialized but set to of out-of-range value. int\_value values can be 0 or 1.
* OOR\_EQUAL(obj, int\_value): This method will compare the object 'obj' to the out-of-range value used to represent int\_value and return true if both objects are equal.