Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
15b361fb
Commit
15b361fb
authored
Nov 23, 2018
by
Deomid Ryabkov
Committed by
Cesanta Bot
Nov 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mbuf_clear()
PUBLISHED_FROM=754b98b3000b24ad3b3d9cc0b4c480ca005a1c3f
parent
3130e592
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
0 deletions
+19
-0
intro.md
docs/c-api/mbuf.h/intro.md
+1
-0
mbuf_clear.md
docs/c-api/mbuf.h/mbuf_clear.md
+10
-0
mongoose.c
mongoose.c
+5
-0
mongoose.h
mongoose.h
+3
-0
No files found.
docs/c-api/mbuf.h/intro.md
View file @
15b361fb
...
...
@@ -4,6 +4,7 @@ symbol_kind: "intro"
decl_name
:
"
mbuf.h"
items
:
-
{
name
:
mbuf_append.md
}
-
{
name
:
mbuf_clear.md
}
-
{
name
:
mbuf_free.md
}
-
{
name
:
mbuf_init.md
}
-
{
name
:
mbuf_insert.md
}
...
...
docs/c-api/mbuf.h/mbuf_clear.md
0 → 100644
View file @
15b361fb
---
title
:
"
mbuf_clear()"
decl_name
:
"
mbuf_clear"
symbol_kind
:
"
func"
signature
:
|
void mbuf_clear(struct mbuf *);
---
Removes all the data from mbuf (if any).
mongoose.c
View file @
15b361fb
...
...
@@ -1620,6 +1620,11 @@ void mbuf_remove(struct mbuf *mb, size_t n) {
}
}
void
mbuf_clear
(
struct
mbuf
*
mb
)
WEAK
;
void
mbuf_clear
(
struct
mbuf
*
mb
)
{
mb
->
len
=
0
;
}
#endif
/* EXCLUDE_COMMON */
#ifdef MG_MODULE_LINES
#line 1 "common/mg_str.c"
...
...
mongoose.h
View file @
15b361fb
...
...
@@ -2388,6 +2388,9 @@ void mbuf_remove(struct mbuf *, size_t data_size);
*/
void
mbuf_resize
(
struct
mbuf
*
,
size_t
new_size
);
/* Removes all the data from mbuf (if any). */
void
mbuf_clear
(
struct
mbuf
*
);
/* Shrinks an Mbuf by resizing its `size` to `len`. */
void
mbuf_trim
(
struct
mbuf
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment