Update doc & comments

This commit is contained in:
Patrick Pelissier committed 2021-03-28 11:48:58 +02:00
1 parent c3858f4e63
commit 5d4fa31083
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -5334,14 +5334,14 @@ false otherwise.
##### void string\_next (string\_it\_t it)
Move the iterator to the next UTF8 encoded character.
It is assumed that string\_end\_p has been called at least once
string\_end\_p shall have been called at least once
per UTF8 character before.
##### string\_unicode\_t string\_get\_cref (const string\_it\_t it)
Return the unicode character associated to the UTF8 encoded character
pointer by the iterator.
It is assumed that string\_end\_p has been called at least once
string\_end\_p shall have been called at least once
per UTF8 character before.
It returns -1 in case of error in decoding the UTF8 string.
+3 -3
View File
@@ -30,7 +30,7 @@
M_BEGIN_PROTECTED_CODE
/* GENINT is a container providing unique integers.
/* GENINT is an internal container providing unique integers.
It has the following properties:
- it stores integer from [0..N) (N is fixed).
- an integer can have only one occurrence in the container.
@@ -39,7 +39,7 @@ M_BEGIN_PROTECTED_CODE
- there are no order (like FIFO or stack)
This can be used to map integers to index of resources in a table.
At most we can support N = 2048 with the master limb usage.
At most we can support N = 32*64 = 2048 with the master limb usage.
For the typical usage of this container
(mapping hardware or software limited resources), this should be
enough.
@@ -60,7 +60,7 @@ typedef struct genint_s {
atomic_ullong *data; // the bitfield which informs if an integer is used or not
} genint_t[1];
// Define the max absolute supported value
// Define the max absolute supported value. It should be 2048 on most implementations.
#define GENINT_MAX_ALLOC (M_GEN1NT_LIMBSIZE * (M_GEN1NT_LIMBSIZE - M_GEN1NT_ABA_CPT))
// Define the size of a limb in bits.
+1 -1
View File
@@ -776,7 +776,7 @@ m_str1ng_replace_all_str_1ge2 (string_t v, const char str1[], size_t str1len, co
M_STR1NG_CONTRACT (v);
M_ASSERT(str1len >= str2len);
/* str1len < str2len so the string doesn't need to be resized */
/* str1len >= str2len so the string doesn't need to be resized */
size_t vlen = string_size(v);
char *org = m_str1ng_get_cstr(v);
char *src = org;