about summary refs log tree commit diff stats
path: root/src/loslib.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-01-02 19:59:49 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-01-02 19:59:49 -0800
commit1fd7f4ad1830e9c6cd074e26635b91edfcd3feac (patch)
tree05fbeaed6a4bda995be5360125a02fb728a4e7a9 /src/loslib.c
parentd0111f1839801fa1dd8380595fac9de9aba72357 (diff)
downloadteliva-1fd7f4ad1830e9c6cd074e26635b91edfcd3feac.tar.gz
drop os.getenv
Diffstat (limited to 'src/loslib.c')
-rw-r--r--src/loslib.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/loslib.c b/src/loslib.c
index 6971d34..785447c 100644
--- a/src/loslib.c
+++ b/src/loslib.c
@@ -59,12 +59,6 @@ static int os_tmpname (lua_State *L) {
 }
 
 
-static int os_getenv (lua_State *L) {
-  lua_pushstring(L, getenv(luaL_checkstring(L, 1)));  /* if NULL push nil */
-  return 1;
-}
-
-
 static int os_clock (lua_State *L) {
   lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);
   return 1;
@@ -217,7 +211,7 @@ static const luaL_Reg syslib[] = {
   {"difftime",  os_difftime},
   /* no execute without sandboxing it */
   {"exit",      os_exit},
-  {"getenv",    os_getenv},
+  /* no getenv without sandboxing it */
   {"remove",    os_remove},
   {"rename",    os_rename},
   {"setlocale", os_setlocale},