blob: 0754f97529eca6b6e30869eed349f79818aa38d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include "posixtz.h"
#define MYNAME "posixtz"
static int Pfrom_file(lua_State *L)
{
const char *s = luaL_checkstring(L, 1);
lua_pushstring(L, posix_tz(s));
return 1;
}
static const luaL_reg R[] =
{
{"from_file", Pfrom_file},
NULL, NULL
};
LUALIB_API int luaopen_posixtz(lua_State *L)
{
luaL_register(L,MYNAME,R);
return 1;
}
|