summaryrefslogtreecommitdiff
path: root/src/compat52.h
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-02-27 15:25:10 +1100
committerdaurnimator <quae@daurnimator.com>2017-02-27 15:35:14 +1100
commit419494337e30fa3fa539990e8ae7c314ce01eaab (patch)
tree34bda624d789b13676a173082e0efc8d2514fc4e /src/compat52.h
parent25337767bfb8d8d40c142e4acc6bc11116b15266 (diff)
downloadluaossl-419494337e30fa3fa539990e8ae7c314ce01eaab.tar.gz
luaossl-419494337e30fa3fa539990e8ae7c314ce01eaab.tar.bz2
luaossl-419494337e30fa3fa539990e8ae7c314ce01eaab.zip
Add lua_getfield compatibility macro that returns the type (as it does in 5.3)
Diffstat (limited to 'src/compat52.h')
-rw-r--r--src/compat52.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compat52.h b/src/compat52.h
index 0057b3c..22541f7 100644
--- a/src/compat52.h
+++ b/src/compat52.h
@@ -23,6 +23,14 @@
23 * USE OR OTHER DEALINGS IN THE SOFTWARE. 23 * USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * ========================================================================== 24 * ==========================================================================
25 */ 25 */
26
27
28#if LUA_VERSION_NUM < 503
29
30#define lua_getfield(L, i, f) (lua_getfield(L, (i), (f)), lua_type(L, -1))
31
32#endif
33
26#if LUA_VERSION_NUM < 502 34#if LUA_VERSION_NUM < 502
27 35
28#define LUA_OK 0 36#define LUA_OK 0