github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/native/types.h (about) 1 2 #ifndef TYPES_H 3 #define TYPES_H 4 5 // NOTE: !NOT MODIFIED ONLY. 6 // This definitions are copied from internal/native/types/types.go. 7 8 #define V_EOF 1 9 #define V_NULL 2 10 #define V_TRUE 3 11 #define V_FALSE 4 12 #define V_ARRAY 5 13 #define V_OBJECT 6 14 #define V_STRING 7 15 #define V_DOUBLE 8 16 #define V_INTEGER 9 17 #define V_KEY_SEP 10 18 #define V_ELEM_SEP 11 19 #define V_ARRAY_END 12 20 #define V_OBJECT_END 13 21 22 #define F_DBLUNQ (1 << 0) 23 #define F_UNIREP (1 << 1) 24 25 #define VS_NULL 0x6c6c756e // 'null' in little endian 26 #define VS_TRUE 0x65757274 // 'true' in little endian 27 #define VS_ALSE 0x65736c61 // 'alse' in little endian ('false' without the 'f') 28 29 #define ERR_EOF 1 30 #define ERR_INVAL 2 31 #define ERR_ESCAPE 3 32 #define ERR_UNICODE 4 33 #define ERR_OVERFLOW 5 34 #define ERR_NUMBER_FMT 6 35 #define ERR_RECURSE_MAX 7 36 #define ERR_FLOAT_INF 8 37 #define ERR_MISMATCH 9 38 #define ERR_INVAL_UTF8 10 39 40 #define ERR_NOT_FOUND 33 41 #define ERR_UNSUPPORT_TYPE 34 42 43 #define MAX_RECURSE 4096 44 45 #endif