mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
remove old float
type entirely
This commit is contained in:
@ -13,7 +13,7 @@ module json
|
||||
#include "cJSON.h"
|
||||
struct C.cJSON {
|
||||
valueint int
|
||||
valuedouble float
|
||||
valuedouble f32
|
||||
valuestring byteptr
|
||||
}
|
||||
|
||||
@ -54,13 +54,6 @@ fn jsdecode_i64(root *C.cJSON) i64 {
|
||||
return i64(root.valuedouble) //i64 is double in C
|
||||
}
|
||||
|
||||
fn jsdecode_float(root *C.cJSON) float {
|
||||
if isnil(root) {
|
||||
return 0
|
||||
}
|
||||
return root.valuedouble
|
||||
}
|
||||
|
||||
fn jsdecode_f32(root *C.cJSON) f32 {
|
||||
if isnil(root) {
|
||||
return f32(0)
|
||||
@ -116,10 +109,6 @@ fn jsencode_i64(val i64) *C.cJSON {
|
||||
return C.cJSON_CreateNumber(val)
|
||||
}
|
||||
|
||||
fn jsencode_float(val float) *C.cJSON {
|
||||
return C.cJSON_CreateNumber(val)
|
||||
}
|
||||
|
||||
fn jsencode_f32(val f32) *C.cJSON {
|
||||
return C.cJSON_CreateNumber(val)
|
||||
}
|
||||
|
Reference in New Issue
Block a user