Reamalgam after .h edits

PUBLISHED_FROM=da1faa9b46cd0ff22dcba6d324b5847c4a0d42d8
This commit is contained in:
Marko Mikulicic authored and Cesanta Bot committed 2016-07-21 15:06:41 +00:00
1 parent 3054952a5e
commit e91a7c9599
9 files changed
+18 -18

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ items:
---
Mbufs are mutable/growing memory buffers, like C++ strings.
Mbuf can append data to the end of a buffer, or insert data into arbitrary
Mbuf can append data to the end of a buffer or insert data into arbitrary
position in the middle of a buffer. The buffer grows automatically when
needed.
+1 -1
View File
@@ -8,5 +8,5 @@ signature: |
Appends data to the Mbuf.
Return the number of bytes appended, or 0 if out of memory.
Returns the number of bytes appended or 0 if out of memory.
+1 -1
View File
@@ -6,5 +6,5 @@ signature: |
void mbuf_free(struct mbuf *);
---
Free the space allocated for the mbuffer and resets the mbuf structure.
Frees the space allocated for the mbuffer and resets the mbuf structure.
+1 -1
View File
@@ -6,6 +6,6 @@ signature: |
void mbuf_init(struct mbuf *, size_t initial_capacity);
---
Initialize an Mbuf.
Initialises an Mbuf.
`initial_capacity` specifies the initial capacity of the mbuf.
+2 -2
View File
@@ -6,9 +6,9 @@ signature: |
size_t mbuf_insert(struct mbuf *, size_t, const void *, size_t);
---
Insert data at a specified offset in the Mbuf.
Inserts data at a specified offset in the Mbuf.
Existing data will be shifted forwards and the buffer will
be grown if necessary.
Return the number of bytes inserted.
Returns the number of bytes inserted.
+1 -1
View File
@@ -6,5 +6,5 @@ signature: |
void mbuf_remove(struct mbuf *, size_t data_size);
---
Remove `data_size` bytes from the beginning of the buffer.
Removes `data_size` bytes from the beginning of the buffer.
+1 -1
View File
@@ -6,7 +6,7 @@ signature: |
void mbuf_resize(struct mbuf *, size_t new_size);
---
Resize an Mbuf.
Resizes an Mbuf.
If `new_size` is smaller than buffer's `len`, the
resize is not performed.
+1 -1
View File
@@ -6,5 +6,5 @@ signature: |
void mbuf_trim(struct mbuf *);
---
Shrink an Mbuf by resizing its `size` to `len`.
Shrinks an Mbuf by resizing its `size` to `len`.
+9 -9
View File
@@ -898,7 +898,7 @@ int mg_vcasecmp(const struct mg_str *str2, const char *str1);
* === Memory Buffers
*
* Mbufs are mutable/growing memory buffers, like C++ strings.
* Mbuf can append data to the end of a buffer, or insert data into arbitrary
* Mbuf can append data to the end of a buffer or insert data into arbitrary
* position in the middle of a buffer. The buffer grows automatically when
* needed.
*/
@@ -924,42 +924,42 @@ struct mbuf {
};
/*
* Initialize an Mbuf.
* Initialises an Mbuf.
* `initial_capacity` specifies the initial capacity of the mbuf.
*/
void mbuf_init(struct mbuf *, size_t initial_capacity);
/* Free the space allocated for the mbuffer and resets the mbuf structure. */
/* Frees the space allocated for the mbuffer and resets the mbuf structure. */
void mbuf_free(struct mbuf *);
/*
* Appends data to the Mbuf.
*
* Return the number of bytes appended, or 0 if out of memory.
* Returns the number of bytes appended or 0 if out of memory.
*/
size_t mbuf_append(struct mbuf *, const void *data, size_t data_size);
/*
* Insert data at a specified offset in the Mbuf.
* Inserts data at a specified offset in the Mbuf.
*
* Existing data will be shifted forwards and the buffer will
* be grown if necessary.
* Return the number of bytes inserted.
* Returns the number of bytes inserted.
*/
size_t mbuf_insert(struct mbuf *, size_t, const void *, size_t);
/* Remove `data_size` bytes from the beginning of the buffer. */
/* Removes `data_size` bytes from the beginning of the buffer. */
void mbuf_remove(struct mbuf *, size_t data_size);
/*
* Resize an Mbuf.
* Resizes an Mbuf.
*
* If `new_size` is smaller than buffer's `len`, the
* resize is not performed.
*/
void mbuf_resize(struct mbuf *, size_t new_size);
/* Shrink an Mbuf by resizing its `size` to `len`. */
/* Shrinks an Mbuf by resizing its `size` to `len`. */
void mbuf_trim(struct mbuf *);
#if defined(__cplusplus)