Add some more extensions from Lua 5.2/5.3.

Contributed by François Perrad.
This commit is contained in:
Mike Pall
2017-01-17 11:37:28 +01:00
parent ed4ce98ac1
commit c198167690
7 changed files with 56 additions and 11 deletions

View File

@@ -23,6 +23,7 @@
#include "lj_tab.h"
#include "lj_meta.h"
#include "lj_state.h"
#include "lj_frame.h"
#if LJ_HASFFI
#include "lj_ctype.h"
#include "lj_cconv.h"
@@ -557,6 +558,12 @@ LJLIB_CF(coroutine_running)
#endif
}
LJLIB_CF(coroutine_isyieldable)
{
setboolV(L->top++, cframe_canyield(L->cframe));
return 1;
}
LJLIB_CF(coroutine_create)
{
lua_State *L1;