H7-TOOL_STM32H7_App/Doc/04.Lua开发.txt
2019-10-24 18:03:30 +08:00

38 lines
903 B
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
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