From 690239bc52cf1f9e22af0b602dcc1fca4dda557a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 8 Sep 2017 18:07:21 +1000 Subject: Add lua_resume --- README.md | 1 + c-api/compat-5.3.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 08614a1..d80405c 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ For Lua 5.1 additionally: * `lua_isinteger` * `lua_numbertointeger` * `lua_callk` and `lua_pcallk` (limited compatibility, see [here][14]) +* `lua_resume` * `lua_rawget` and `lua_rawgeti` (return values) * `lua_rawgetp` and `lua_rawsetp` * `luaL_requiref` (now checks `package.loaded` first) diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index bee77a1..3d20d21 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h @@ -186,6 +186,9 @@ COMPAT53_API int luaL_execresult (lua_State *L, int stat); #define lua_pcallk(L, na, nr, err, ctx, cont) \ ((void)(ctx), (void)(cont), lua_pcall((L), (na), (nr), (err))) +#define lua_resume(L, from, nargs) \ + ((void)(from), lua_resume((L), (nargs))) + #define luaL_buffinit COMPAT53_CONCAT(COMPAT53_PREFIX, _buffinit_53) COMPAT53_API void luaL_buffinit (lua_State *L, luaL_Buffer_53 *B); -- cgit v1.2.3-55-g6feb