rewrite SSM and clonefunction

This commit is contained in:
Cloud Wu
2019-04-16 21:16:13 +08:00
committed by 云风
parent 2d6d2c75a4
commit 2ceb642b5d
32 changed files with 934 additions and 645 deletions

View File

@@ -597,7 +597,7 @@ static int pmain (lua_State *L) {
int main (int argc, char **argv) {
int status, result;
lua_State *L;
luaS_initshr(); /* init global short string table */
luaS_initssm();
L = luaL_newstate(); /* create state */
if (L == NULL) {
l_message(argv[0], "cannot create state: not enough memory");
@@ -610,7 +610,7 @@ int main (int argc, char **argv) {
result = lua_toboolean(L, -1); /* get result */
report(L, status);
lua_close(L);
luaS_exitshr();
luaS_exitssm();
return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE;
}