diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-13 01:39:44 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-13 01:39:44 +0800 |
commit | 3037e00cf92dbe072c02ab46e930007fef201d54 (patch) | |
tree | 8fd8fcc3cfc09ee0e9d9f7d4aeab6890321e0906 /mbbsd | |
parent | bc9f4f0f87cfe465d0a63591513b6d4bcbd85aa5 (diff) | |
download | pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar.gz pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar.bz2 pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar.lz pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar.xz pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.tar.zst pttbbs-3037e00cf92dbe072c02ab46e930007fef201d54.zip |
- bbslua: minor revise
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3831 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbslua.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c index 52247a44..7e755b5e 100644 --- a/mbbsd/bbslua.c +++ b/mbbsd/bbslua.c @@ -1153,12 +1153,6 @@ bbslua(const char *fpath) int lineshift; AllocData ad; - alloc_init(&ad); - L = lua_newstate(allocf, &ad); - if (!L) - return 0; - lua_atpanic(L, &panic); - #ifdef UMODE_BBSLUA unsigned int prevmode = getutmpmode(); #endif @@ -1167,6 +1161,13 @@ bbslua(const char *fpath) if (runningBBSLua) return 0; + // init lua + alloc_init(&ad); + L = lua_newstate(allocf, &ad); + if (!L) + return 0; + lua_atpanic(L, &panic); + abortBBSLua = 0; // detect file |