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

net: byte fixes

This commit is contained in:
Alexander Medvednikov
2022-04-15 15:55:39 +03:00
parent fb192d949b
commit af73e195da
18 changed files with 54 additions and 65 deletions

View File

@ -71,13 +71,6 @@ fn decode_i64(root &C.cJSON) i64 {
return i64(root.valuedouble) // i64 is double in C
}
fn decode_u8(root &C.cJSON) byte {
if isnil(root) {
return u8(0)
}
return u8(root.valueint)
}
fn decode_u8(root &C.cJSON) u8 {
if isnil(root) {
return u8(0)
@ -168,10 +161,6 @@ fn encode_i64(val i64) &C.cJSON {
return C.cJSON_CreateNumber(val)
}
fn encode_u8(val byte) &C.cJSON {
return C.cJSON_CreateNumber(val)
}
fn encode_u8(val u8) &C.cJSON {
return C.cJSON_CreateNumber(val)
}