fix: hdgnss调用mobile.reqCellInfo传错时间单位了
[LuatOS.git] / lua / include / rotable.h
bloba2dc88370c7ec6887502a8d1276c99078a516c0d
1 #ifndef ROTABLE_H_
2 #define ROTABLE_H_
4 #include "lua.h"
6 /* exactly the same as luaL_Reg, but since we are on small embedded
7 * microcontrollers, we don't assume that you have `lauxlib.h`
8 * available in your build! */
9 typedef struct rotable_Reg {
10 char const* name;
11 lua_CFunction func;
12 lua_Integer value;
13 } rotable_Reg;
15 #ifndef ROTABLE_EXPORT
16 # define ROTABLE_EXPORT extern
17 #endif
19 /* compatible with `luaL_newlib()`, and works with `luaL_Reg` *and*
20 * `rotable_Reg` arrays (in case you don't use `lauxlib.h`) */
21 ROTABLE_EXPORT void rotable_newlib( lua_State* L, void const* reg );
23 /* Since userdatas can not be used as `__index` meta methods directly
24 * this function creates a C closure that looks up keys in a given
25 * `rotable_Reg` array. */
26 ROTABLE_EXPORT void rotable_newidx( lua_State* L, void const* reg );
28 #endif /* ROTABLE_H_ */