summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/nixio.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-28 21:21:52 +0000
committerSteven Barth <steven@midlink.org>2009-02-28 21:21:52 +0000
commit33fe5b57d76b287bad42de085e63fe2130ba2be3 (patch)
tree7246c66763386b8c92b12c8c0bfb6d71d003a68a /libs/nixio/src/nixio.c
parent0a224c5ca8ecb5d342e01acd1b3591cbb81c7512 (diff)
More splicing stuff
Diffstat (limited to 'libs/nixio/src/nixio.c')
-rw-r--r--libs/nixio/src/nixio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/nixio/src/nixio.c b/libs/nixio/src/nixio.c
index 383fc0af93..ae1af7a16b 100644
--- a/libs/nixio/src/nixio.c
+++ b/libs/nixio/src/nixio.c
@@ -88,8 +88,14 @@ int nixio__tofd(lua_State *L, int ud) {
return fd;
}
+static int nixio_strerror(lua_State *L) {
+ lua_pushstring(L, strerror(luaL_checkinteger(L, 1)));
+ return 1;
+}
+
/* object table */
static const luaL_reg R[] = {
+ {"strerror", nixio_strerror},
{NULL, NULL}
};