| 1774 | lua_setfield(L, -2, name) |
| 1775 | |
| 1776 | static void init_datetime(Lua L) |
| 1777 | { |
| 1778 | luaL_newmetatable(L, "datetime_helper"); |
| 1779 | lua_pushstring(L, "__index"); |
| 1780 | lua_pushvalue(L, -2); |
| 1781 | lua_settable(L, 3); |
| 1782 | luaL_openlib(L, NULL, datetime_funcs, 0); |
| 1783 | lua_pop(L, 1); |
| 1784 | |
| 1785 | luaL_newmetatable(L, dbtypes.datetime); |
| 1786 | setup_method(L, "__index", l_datetime_index); |
| 1787 | setup_method(L, "__tostring", l_datetime_tostring); |
| 1788 | init_arithmetic(L, 0); |
| 1789 | init_cmp(L); |
| 1790 | init_common(L); |
| 1791 | lua_pop(L, 1); |
| 1792 | } |
| 1793 | |
| 1794 | static int l_intervalym_years(Lua L) |
| 1795 | { |
no test coverage detected