aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/ldump.c
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-08-24 09:21:38 +0800
committerLi Jin <dragon-fly@qq.com>2023-08-24 09:21:38 +0800
commitcfcea12ba0e6a40d7c04ac64c75563db0896985c (patch)
tree8ee7c6d9cd5f7b60fd9bda035b703cc9969ab678 /src/3rdParty/lua/ldump.c
parenteb48c686a7ab5bd3f3f3a8628ed0423872a932c6 (diff)
downloadyuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.tar.gz
yuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.tar.bz2
yuescript-cfcea12ba0e6a40d7c04ac64c75563db0896985c.zip
update Lua 5.4.
Diffstat (limited to 'src/3rdParty/lua/ldump.c')
-rw-r--r--src/3rdParty/lua/ldump.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rdParty/lua/ldump.c b/src/3rdParty/lua/ldump.c
index f848b66..f231691 100644
--- a/src/3rdParty/lua/ldump.c
+++ b/src/3rdParty/lua/ldump.c
@@ -10,6 +10,7 @@
10#include "lprefix.h" 10#include "lprefix.h"
11 11
12 12
13#include <limits.h>
13#include <stddef.h> 14#include <stddef.h>
14 15
15#include "lua.h" 16#include "lua.h"
@@ -55,8 +56,11 @@ static void dumpByte (DumpState *D, int y) {
55} 56}
56 57
57 58
58/* dumpInt Buff Size */ 59/*
59#define DIBS ((sizeof(size_t) * 8 / 7) + 1) 60** 'dumpSize' buffer size: each byte can store up to 7 bits. (The "+6"
61** rounds up the division.)
62*/
63#define DIBS ((sizeof(size_t) * CHAR_BIT + 6) / 7)
60 64
61static void dumpSize (DumpState *D, size_t x) { 65static void dumpSize (DumpState *D, size_t x) {
62 lu_byte buff[DIBS]; 66 lu_byte buff[DIBS];