diff options
author | Mike Pall <mike> | 2017-01-17 11:37:28 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2017-01-17 11:37:28 +0100 |
commit | c1981676907cedde9ffe2bbdfb28d2f786ff69d9 (patch) | |
tree | 08fec89b79040b758cc4473163a5e40dbe355799 /src/lib_base.c | |
parent | ed4ce98ac1471a1d8a4f50486adb29771dcab9f2 (diff) | |
download | luajit-c1981676907cedde9ffe2bbdfb28d2f786ff69d9.tar.gz luajit-c1981676907cedde9ffe2bbdfb28d2f786ff69d9.tar.bz2 luajit-c1981676907cedde9ffe2bbdfb28d2f786ff69d9.zip |
Add some more extensions from Lua 5.2/5.3.
Contributed by François Perrad.
Diffstat (limited to 'src/lib_base.c')
-rw-r--r-- | src/lib_base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib_base.c b/src/lib_base.c index 6107bde0..7c523241 100644 --- a/src/lib_base.c +++ b/src/lib_base.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "lj_tab.h" | 23 | #include "lj_tab.h" |
24 | #include "lj_meta.h" | 24 | #include "lj_meta.h" |
25 | #include "lj_state.h" | 25 | #include "lj_state.h" |
26 | #include "lj_frame.h" | ||
26 | #if LJ_HASFFI | 27 | #if LJ_HASFFI |
27 | #include "lj_ctype.h" | 28 | #include "lj_ctype.h" |
28 | #include "lj_cconv.h" | 29 | #include "lj_cconv.h" |
@@ -557,6 +558,12 @@ LJLIB_CF(coroutine_running) | |||
557 | #endif | 558 | #endif |
558 | } | 559 | } |
559 | 560 | ||
561 | LJLIB_CF(coroutine_isyieldable) | ||
562 | { | ||
563 | setboolV(L->top++, cframe_canyield(L->cframe)); | ||
564 | return 1; | ||
565 | } | ||
566 | |||
560 | LJLIB_CF(coroutine_create) | 567 | LJLIB_CF(coroutine_create) |
561 | { | 568 | { |
562 | lua_State *L1; | 569 | lua_State *L1; |