3rdparty (yyjson): upgrade to 0.11.1

This commit is contained in:
Carter Li
2025-05-14 08:52:06 +08:00
parent f22d73d473
commit 7a2cbc060f
3 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"home": "https://github.com/ibireme/yyjson",
"license": "MIT ( embed in source )",
"version": "0.11.0",
"version": "0.11.1",
"author": "ibireme"
}
+14 -5
View File
@@ -566,6 +566,8 @@ typedef union v64_uni { v64 v; u64 u; } v64_uni;
*============================================================================*/
#define byte_move_idx(x) ((char *)dst)[x] = ((const char *)src)[x];
#define byte_move_src(x) ((char *)tmp)[x] = ((const char *)src)[x];
#define byte_move_dst(x) ((char *)dst)[x] = ((const char *)tmp)[x];
static_inline void byte_copy_2(void *dst, const void *src) {
#if !YYJSON_DISABLE_UNALIGNED_MEMORY_ACCESS
@@ -605,7 +607,9 @@ static_inline void byte_move_2(void *dst, const void *src) {
memcpy(&tmp, src, 2);
memcpy(dst, &tmp, 2);
#else
repeat2_incr(byte_move_idx)
char tmp[2];
repeat2_incr(byte_move_src)
repeat2_incr(byte_move_dst)
#endif
}
@@ -615,7 +619,9 @@ static_inline void byte_move_4(void *dst, const void *src) {
memcpy(&tmp, src, 4);
memcpy(dst, &tmp, 4);
#else
repeat4_incr(byte_move_idx)
char tmp[4];
repeat4_incr(byte_move_src)
repeat4_incr(byte_move_dst)
#endif
}
@@ -625,7 +631,9 @@ static_inline void byte_move_8(void *dst, const void *src) {
memcpy(&tmp, src, 8);
memcpy(dst, &tmp, 8);
#else
repeat8_incr(byte_move_idx)
char tmp[8];
repeat8_incr(byte_move_src)
repeat8_incr(byte_move_dst)
#endif
}
@@ -639,7 +647,9 @@ static_inline void byte_move_16(void *dst, const void *src) {
memcpy(pdst, &tmp1, 8);
memcpy(pdst + 8, &tmp2, 8);
#else
repeat16_incr(byte_move_idx)
char tmp[16];
repeat16_incr(byte_move_src)
repeat16_incr(byte_move_dst)
#endif
}
@@ -700,7 +710,6 @@ static_inline u32 byte_load_4(const void *src) {
#if !YYJSON_DISABLE_UNALIGNED_MEMORY_ACCESS
memcpy(&uni, src, 4);
#else
v32_uni uni;
uni.v.c[0] = ((const char *)src)[0];
uni.v.c[1] = ((const char *)src)[1];
uni.v.c[2] = ((const char *)src)[2];
+3 -3
View File
@@ -502,13 +502,13 @@ extern "C" {
#define YYJSON_VERSION_MINOR 11
/** The patch version of yyjson. */
#define YYJSON_VERSION_PATCH 0
#define YYJSON_VERSION_PATCH 1
/** The version of yyjson in hex: `(major << 16) | (minor << 8) | (patch)`. */
#define YYJSON_VERSION_HEX 0x000B00
#define YYJSON_VERSION_HEX 0x000B01
/** The version string of yyjson. */
#define YYJSON_VERSION_STRING "0.11.0"
#define YYJSON_VERSION_STRING "0.11.1"
/** The version of yyjson in hex, same as `YYJSON_VERSION_HEX`. */
yyjson_api uint32_t yyjson_version(void);