1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: add unsafe{} wrappers to C. fn calls, to allow compiling with -prod again

This commit is contained in:
Delyan Angelov
2020-07-21 09:05:31 +03:00
parent 6dbc143d67
commit 0af415fa28
6 changed files with 14 additions and 14 deletions

View File

@@ -187,7 +187,7 @@ fn json_parse(s string) &C.cJSON {
// json_string := json_print(encode_User(user))
fn json_print(json &C.cJSON) string {
s := C.cJSON_PrintUnformatted(json)
return tos(s, C.strlen(s))
return unsafe { tos(s, C.strlen(s)) }
}
// / cjson wrappers