Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
68dd8d27
Commit
68dd8d27
authored
Jul 12, 2016
by
Alexander Alashkin
Committed by
Cesanta Bot
Jul 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of ubjson
PUBLISHED_FROM=e6f1dca95ec7ed3795adf493cca9cdcdc07381f5
parent
36a19279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
mongoose.c
mongoose.c
+5
-0
mongoose.h
mongoose.h
+2
-1
No files found.
mongoose.c
View file @
68dd8d27
...
...
@@ -971,6 +971,11 @@ struct mg_str mg_mk_str(const char *s) {
return
ret
;
}
struct
mg_str
mg_mk_str_n
(
const
char
*
s
,
size_t
len
)
{
struct
mg_str
ret
=
{
s
,
len
};
return
ret
;
}
int
mg_vcmp
(
const
struct
mg_str
*
str1
,
const
char
*
str2
)
{
size_t
n2
=
strlen
(
str2
),
n1
=
str1
->
len
;
int
r
=
memcmp
(
str1
->
p
,
str2
,
(
n1
<
n2
)
?
n1
:
n2
);
...
...
mongoose.h
View file @
68dd8d27
...
...
@@ -862,10 +862,11 @@ struct mg_str {
};
/*
*
A helper function
for creating mg_str struct from plain C string.
*
Helper functions
for creating mg_str struct from plain C string.
* `NULL` is allowed and becomes `{NULL, 0}`.
*/
struct
mg_str
mg_mk_str
(
const
char
*
s
);
struct
mg_str
mg_mk_str_n
(
const
char
*
s
,
size_t
len
);
/* Macro for initializing mg_str. */
#define MG_MK_STR(str_literal) \
...
...
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