util-src/pposix.c

changeset 727
78c9542de94e
parent 723
c1e7d280c174
child 729
f62ef65d5c01
equal deleted inserted replaced
726:68a776711ba9 727:78c9542de94e
18 */ 18 */
19 19
20 /* pposix.c 20 /* pposix.c
21 POSIX support functions for Lua 21 POSIX support functions for Lua
22 */ 22 */
23
24 #define MODULE_VERSION "0.3.0"
23 25
24 #include <stdlib.h> 26 #include <stdlib.h>
25 #include <unistd.h> 27 #include <unistd.h>
26 #include <libgen.h> 28 #include <libgen.h>
27 #include <sys/types.h> 29 #include <sys/types.h>
228 lua_setfield(L, -2, "syslog_log"); 230 lua_setfield(L, -2, "syslog_log");
229 231
230 lua_pushcfunction(L, lc_getpid); 232 lua_pushcfunction(L, lc_getpid);
231 lua_setfield(L, -2, "getpid"); 233 lua_setfield(L, -2, "getpid");
232 234
235 lua_pushliteral(L, "pposix");
236 lua_setfield(L, -2, "_NAME");
237
238 lua_pushliteral(L, MODULE_VERSION);
239 lua_setfield(L, -2, "_VERSION");
240
233 return 1; 241 return 1;
234 }; 242 };

mercurial