Changeset

7926:b009c27818c6

util.pposix: Expose ENOENT constant (usually 2, but you never know)
author Kim Alvefur <zash@zash.se>
date Wed, 01 Mar 2017 17:03:48 +0100
parents 7925:209503ee3aaa
children 7927:7132abcf669e
files util-src/pposix.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/pposix.c	Wed Mar 01 16:44:59 2017 +0100
+++ b/util-src/pposix.c	Wed Mar 01 17:03:48 2017 +0100
@@ -835,6 +835,11 @@
 	lua_newtable(L);
 	luaL_setfuncs(L, exports, 0);
 
+#ifdef ENOENT
+	lua_pushinteger(L, ENOENT);
+	lua_setfield(L, -2, "ENOENT");
+#endif
+
 	lua_pushliteral(L, "pposix");
 	lua_setfield(L, -2, "_NAME");