Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Lua Json
Commits
c82f86f1
Commit
c82f86f1
authored
Mar 29, 2021
by
neoxic
Browse files
Since Lua 5.4 lua_pushvfstring() no longer checks stack
parent
1355fae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/json-encode.c
View file @
c82f86f1
...
@@ -145,6 +145,9 @@ static int isInteger(lua_State *L, int idx, lua_Integer *val) {
...
@@ -145,6 +145,9 @@ static int isInteger(lua_State *L, int idx, lua_Integer *val) {
static
int
error
(
lua_State
*
L
,
int
*
nerr
,
const
char
*
fmt
,
...)
{
static
int
error
(
lua_State
*
L
,
int
*
nerr
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
#if LUA_VERSION_NUM >= 504
luaL_checkstack
(
L
,
1
,
0
);
#endif
lua_pushvfstring
(
L
,
fmt
,
ap
);
lua_pushvfstring
(
L
,
fmt
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
lua_insert
(
L
,
-
(
++
(
*
nerr
)));
lua_insert
(
L
,
-
(
++
(
*
nerr
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment