From af7d49103bb845aba79b4f320d3e1ef06a0c3fde Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 13 Jul 2019 16:47:23 +0200 Subject: [PATCH] json: Windows fix --- vlib/json/json_primitives.v | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/vlib/json/json_primitives.v b/vlib/json/json_primitives.v index 810895a18e..ca92cd88b2 100644 --- a/vlib/json/json_primitives.v +++ b/vlib/json/json_primitives.v @@ -4,14 +4,10 @@ module json -// TODO: windows support - -#flag linux -I @VROOT/thirdparty/cJSON -#flag darwin -I @VROOT/thirdparty/cJSON - +#flag -I @VROOT/thirdparty/cJSON #flag @VROOT/thirdparty/cJSON/cJSON.o - #include "cJSON.h" + struct C.cJSON { valueint int valuedouble f32 @@ -25,8 +21,6 @@ fn jsdecode_int(root *C.cJSON) int { return root.valueint } -//TODO: Refactor with generics when it will be avaible - fn jsdecode_i8(root *C.cJSON) i8 { if isnil(root) { return i8(0) @@ -90,7 +84,6 @@ fn jsdecode_bool(root *C.cJSON) bool { } // /////////////////// -//TODO: Refactor with Generics when it will be available fn jsencode_int(val int) *C.cJSON { return C.cJSON_CreateNumber(val) }