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
Nodemcu Firmware
Commits
bf549a24
"tests/vscode:/vscode.git/clone" did not exist on "b278e443761df27a6e425ec4652f33bd494ceb94"
Commit
bf549a24
authored
Nov 04, 2018
by
devsaurus
Browse files
make ldblib.c compilable with extended debug support
parent
dc0c6ff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/lua/ldblib.c
View file @
bf549a24
...
@@ -301,6 +301,7 @@ static int db_gethook (lua_State *L) {
...
@@ -301,6 +301,7 @@ static int db_gethook (lua_State *L) {
}
}
#if defined(LUA_CROSS_COMPILER)
static
int
db_debug
(
lua_State
*
L
)
{
static
int
db_debug
(
lua_State
*
L
)
{
for
(;;)
{
for
(;;)
{
char
buffer
[
LUA_MAXINPUT
];
char
buffer
[
LUA_MAXINPUT
];
...
@@ -325,6 +326,7 @@ static int db_debug (lua_State *L) {
...
@@ -325,6 +326,7 @@ static int db_debug (lua_State *L) {
lua_settop
(
L
,
0
);
/* remove eventual returns */
lua_settop
(
L
,
0
);
/* remove eventual returns */
}
}
}
}
#endif // defined(LUA_CROSS_COMPILER)
#endif
#endif
#define LEVELS1 12
/* size of the first part of the stack */
#define LEVELS1 12
/* size of the first part of the stack */
...
@@ -387,7 +389,9 @@ static int db_errorfb (lua_State *L) {
...
@@ -387,7 +389,9 @@ static int db_errorfb (lua_State *L) {
#include "lrodefs.h"
#include "lrodefs.h"
const
LUA_REG_TYPE
dblib
[]
=
{
const
LUA_REG_TYPE
dblib
[]
=
{
#ifndef CONFIG_LUA_BUILTIN_DEBUG_MINIMAL
#ifndef CONFIG_LUA_BUILTIN_DEBUG_MINIMAL
#if defined(LUA_CROSS_COMPILER)
{
LSTRKEY
(
"debug"
),
LFUNCVAL
(
db_debug
)},
{
LSTRKEY
(
"debug"
),
LFUNCVAL
(
db_debug
)},
#endif // defined(LUA_CROSS_COMPILER)
{
LSTRKEY
(
"getfenv"
),
LFUNCVAL
(
db_getfenv
)},
{
LSTRKEY
(
"getfenv"
),
LFUNCVAL
(
db_getfenv
)},
{
LSTRKEY
(
"gethook"
),
LFUNCVAL
(
db_gethook
)},
{
LSTRKEY
(
"gethook"
),
LFUNCVAL
(
db_gethook
)},
{
LSTRKEY
(
"getinfo"
),
LFUNCVAL
(
db_getinfo
)},
{
LSTRKEY
(
"getinfo"
),
LFUNCVAL
(
db_getinfo
)},
...
...
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