mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove string clone because cJSON already did internally
This commit is contained in:
parent
a9127bedf7
commit
09e390eac5
@ -165,9 +165,7 @@ fn jsencode_bool(val bool) &C.cJSON {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn jsencode_string(val string) &C.cJSON {
|
fn jsencode_string(val string) &C.cJSON {
|
||||||
clone := val.clone()
|
return C.cJSON_CreateString(val.str)
|
||||||
return C.cJSON_CreateString(clone.str)
|
|
||||||
// return C.cJSON_CreateString2(val.str, val.len)
|
|
||||||
}
|
}
|
||||||
// ///////////////////////
|
// ///////////////////////
|
||||||
// user := decode_User(json_parse(js_string_var))
|
// user := decode_User(json_parse(js_string_var))
|
||||||
|
Loading…
Reference in New Issue
Block a user