remove string clone because cJSON already did internally

pull/3497/head
S-YOU 2020-01-19 01:40:58 +09:00 committed by Alexander Medvednikov
parent a9127bedf7
commit 09e390eac5
1 changed files with 1 additions and 3 deletions

View File

@ -165,9 +165,7 @@ fn jsencode_bool(val bool) &C.cJSON {
}
fn jsencode_string(val string) &C.cJSON {
clone := val.clone()
return C.cJSON_CreateString(clone.str)
// return C.cJSON_CreateString2(val.str, val.len)
return C.cJSON_CreateString(val.str)
}
// ///////////////////////
// user := decode_User(json_parse(js_string_var))