mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +00:00
init global string table, See issue #331
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
#include "lstring.h"
|
||||
|
||||
|
||||
#if !defined(LUA_PROMPT)
|
||||
@@ -596,7 +597,9 @@ static int pmain (lua_State *L) {
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
int status, result;
|
||||
lua_State *L = luaL_newstate(); /* create state */
|
||||
lua_State *L;
|
||||
luaS_initshr(); /* init global short string table */
|
||||
L = luaL_newstate(); /* create state */
|
||||
if (L == NULL) {
|
||||
l_message(argv[0], "cannot create state: not enough memory");
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user