diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-22 11:41:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-06-22 11:41:48 -0300 |
commit | ab6a94952215b1f66436d8eeebded1dad9fa5409 (patch) | |
tree | ba66254537defc76602ce351d962b899ddfe1b29 /ldump.c | |
parent | 86e8039a72646cd9192fd08a6f1771c90b872ff6 (diff) | |
parent | ea39042e13645f63713425c05cc9ee4cfdcf0a40 (diff) | |
download | lua-ab6a94952215b1f66436d8eeebded1dad9fa5409.tar.gz lua-ab6a94952215b1f66436d8eeebded1dad9fa5409.tar.bz2 lua-ab6a94952215b1f66436d8eeebded1dad9fa5409.zip |
Merge branch 'master' into nextversion
Diffstat (limited to 'ldump.c')
-rw-r--r-- | ldump.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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" |
@@ -59,8 +60,11 @@ static void dumpByte (DumpState *D, int y) { | |||
59 | } | 60 | } |
60 | 61 | ||
61 | 62 | ||
62 | /* dumpInt Buff Size */ | 63 | /* |
63 | #define DIBS ((sizeof(size_t) * 8 / 7) + 1) | 64 | ** 'dumpSize' buffer size: each byte can store up to 7 bits. (The "+6" |
65 | ** rounds up the division.) | ||
66 | */ | ||
67 | #define DIBS ((sizeof(size_t) * CHAR_BIT + 6) / 7) | ||
64 | 68 | ||
65 | static void dumpSize (DumpState *D, size_t x) { | 69 | static void dumpSize (DumpState *D, size_t x) { |
66 | lu_byte buff[DIBS]; | 70 | lu_byte buff[DIBS]; |