mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Get rid of ubjson
PUBLISHED_FROM=e6f1dca95ec7ed3795adf493cca9cdcdc07381f5
This commit is contained in:
parent
36a1927915
commit
68dd8d277d
@ -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);
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user