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

ci: fix compilation

This commit is contained in:
Delyan Angelov
2021-04-04 20:14:51 +03:00
parent 824790a2bd
commit accd4d83bf
7 changed files with 115 additions and 11 deletions

View File

@@ -190,12 +190,12 @@ 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 unsafe { tos(byteptr(s), C.strlen(s)) }
return unsafe { tos(byteptr(s), C.strlen(&char(s))) }
}
fn json_print_pretty(json &C.cJSON) string {
s := C.cJSON_Print(json)
return unsafe { tos(byteptr(s), C.strlen(s)) }
return unsafe { tos(byteptr(s), C.strlen(&char(s))) }
}
// / cjson wrappers