mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
bring mg_strdup() back
This commit is contained in:
1 parent
a4e0225c69
commit
ab75bfa6e7
11 files changed
+46
-16
No files matched your search
@@ -1854,6 +1854,12 @@ static bool chkdbl(struct mg_str s, double val) {
|
||||
}
|
||||
|
||||
static void test_str(void) {
|
||||
{
|
||||
struct mg_str s = mg_strdup(mg_str("a"));
|
||||
ASSERT(mg_strcmp(s, mg_str("a")) == 0);
|
||||
free((void *) s.buf);
|
||||
}
|
||||
|
||||
{
|
||||
const char *s;
|
||||
struct mg_str a = mg_str("hello"), b = mg_str("a"), c = mg_str(NULL);
|
||||
|
||||
Reference in new issue
Block a user