mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
parent
188d68d32d
commit
fd79183122
@ -12,6 +12,15 @@ module cjson
|
|||||||
#flag @VEXEROOT/thirdparty/cJSON/cJSON.o
|
#flag @VEXEROOT/thirdparty/cJSON/cJSON.o
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
|
|
||||||
|
// As cJSON use `libm`, we need to link it.
|
||||||
|
$if windows {
|
||||||
|
$if tinyc {
|
||||||
|
#flag @VEXEROOT/thirdparty/tcc/lib/openlibm.o
|
||||||
|
}
|
||||||
|
} $else {
|
||||||
|
#flag -lm
|
||||||
|
}
|
||||||
|
|
||||||
@[flag]
|
@[flag]
|
||||||
pub enum CJsonType {
|
pub enum CJsonType {
|
||||||
t_false
|
t_false
|
||||||
|
@ -8,6 +8,15 @@ module json
|
|||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#define js_get(object, key) cJSON_GetObjectItemCaseSensitive((object), (key))
|
#define js_get(object, key) cJSON_GetObjectItemCaseSensitive((object), (key))
|
||||||
|
|
||||||
|
// As cJSON use `libm`, we need to link it.
|
||||||
|
$if windows {
|
||||||
|
$if tinyc {
|
||||||
|
#flag @VEXEROOT/thirdparty/tcc/lib/openlibm.o
|
||||||
|
}
|
||||||
|
} $else {
|
||||||
|
#flag -lm
|
||||||
|
}
|
||||||
|
|
||||||
pub struct C.cJSON {
|
pub struct C.cJSON {
|
||||||
valueint int
|
valueint int
|
||||||
valuedouble f64
|
valuedouble f64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user