mirror of
https://github.com/armfly/H7-TOOL_STM32H7_App.git
synced 2024-08-09 10:05:34 +08:00
38 lines
903 B
Plaintext
Executable File
38 lines
903 B
Plaintext
Executable File
/*
|
||
lua 增加调试代码的方法:
|
||
|
||
lobject.c文件:
|
||
const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) {
|
||
#if 1
|
||
printf("%s", msg);
|
||
#endif
|
||
|
||
ldebug.c 文件 luaG_runerror 函数,增加printf
|
||
|
||
lauxlib.c 文件 luaL_error函数,增加printf
|
||
|
||
ldo.c 文件 luaD_throw 函数 printf("\r\nthrow errcode=%d\r\n", errcode);
|
||
|
||
lua.h 定义错误代码
|
||
#define LUA_ERRRUN 2
|
||
#define LUA_ERRSYNTAX 3
|
||
#define LUA_ERRMEM 4
|
||
#define LUA_ERRGCMM 5
|
||
#define LUA_ERRERR 6
|
||
|
||
一次分配内存不可以大于 MAX_SIZET
|
||
|
||
*/
|
||
|
||
/*
|
||
luaconf.h 文件对浮点和整数的处理。 缺省64位整数,双精度浮点
|
||
default configuration for 64-bit Lua ('long long' and 'double')
|
||
*/
|
||
|
||
luaconf.h
|
||
#if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE
|
||
#define LUAL_BUFFERSIZE 8192
|
||
#else
|
||
#define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer)))
|
||
#endif
|