diff --git a/src/lapi.c b/src/lapi.c index 5d5145d..3e3cb5e 100644 --- a/src/lapi.c +++ b/src/lapi.c @@ -145,7 +145,6 @@ LUA_API lua_State *lua_newthread (lua_State *L) { setthvalue(L, L->top, L1); api_incr_top(L); lua_unlock(L); - luai_userstatethread(L, L1); return L1; } diff --git a/src/ldo.c b/src/ldo.c index d1bf786..ffcb031 100644 --- a/src/ldo.c +++ b/src/ldo.c @@ -422,7 +422,6 @@ LUA_API int lua_resume (lua_State *L, int nargs) { return resume_error(L, "cannot resume non-suspended coroutine"); if (L->nCcalls >= LUAI_MAXCCALLS) return resume_error(L, "C stack overflow"); - luai_userstateresume(L, nargs); lua_assert(L->errfunc == 0); L->baseCcalls = ++L->nCcalls; status = luaD_rawrunprotected(L, resume, L->top - nargs); @@ -442,7 +441,6 @@ LUA_API int lua_resume (lua_State *L, int nargs) { LUA_API int lua_yield (lua_State *L, int nresults) { - luai_userstateyield(L, nresults); lua_lock(L); if (L->nCcalls > L->baseCcalls) luaG_runerror(L, "attempt to yield across metamethod/C-call boundary"); diff --git a/src/lstate.c b/src/lstate.c index cdcd669..b283d46 100644 --- a/src/lstate.c +++ b/src/lstate.c @@ -129,7 +129,6 @@ lua_State *luaE_newthread (lua_State *L) { void luaE_freethread (lua_State *L, lua_State *L1) { luaF_close(L1, L1->stack); /* close all upvalues for this thread */ lua_assert(L1->openupval == NULL); - luai_userstatefree(L1); freestack(L, L1); luaM_freemem(L, cast(lu_byte*, L1), sizeof(lua_State)); } @@ -179,8 +178,6 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { close_state(L); L = NULL; } - else - luai_userstateopen(L); return L; } @@ -203,7 +200,6 @@ LUA_API void lua_close (lua_State *L) { L->nCcalls = L->baseCcalls = 0; } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0); lua_assert(G(L)->tmudata == NULL); - luai_userstateclose(L); close_state(L); } diff --git a/src/luaconf.h b/src/luaconf.h index f24ed0e..613739a 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -664,19 +664,6 @@ union luai_Cast { double l_d; long l_l; }; #endif -/* -@@ luai_userstate* allow user-specific actions on threads. -** CHANGE them if you defined LUAI_EXTRASPACE and need to do something -** extra when a thread is created/deleted/resumed/yielded. -*/ -#define luai_userstateopen(L) ((void)L) -#define luai_userstateclose(L) ((void)L) -#define luai_userstatethread(L,L1) ((void)L) -#define luai_userstatefree(L) ((void)L) -#define luai_userstateresume(L,n) ((void)L) -#define luai_userstateyield(L,n) ((void)L) - - /* @@ LUA_INTFRMLEN is the length modifier for integer conversions @* in 'string.format'. diff --git a/src/notes b/src/notes index 3977255..ff25625 100644 --- a/src/notes +++ b/src/notes @@ -8,6 +8,5 @@ lua_State: &{Value; int tt} stack, stack_last, base, top == todo stack -eradicate LUAI_EXTRASPACE lua_newstate lua_State's stack