Software /
code /
prosody
Comparison
util-src/table.c @ 12976:a187600ec7d6
util: Add compat for prosody module name change to C sources
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 18:03:07 +0100 |
parent | 12591:494577d883ff |
comparison
equal
deleted
inserted
replaced
12975:d10957394a3c | 12976:a187600ec7d6 |
---|---|
58 | 58 |
59 lua_pushvalue(L, tt); /* return destination table */ | 59 lua_pushvalue(L, tt); /* return destination table */ |
60 return 1; | 60 return 1; |
61 } | 61 } |
62 | 62 |
63 int luaopen_util_table(lua_State *L) { | 63 int luaopen_prosody_util_table(lua_State *L) { |
64 luaL_checkversion(L); | 64 luaL_checkversion(L); |
65 lua_createtable(L, 0, 2); | 65 lua_createtable(L, 0, 2); |
66 lua_pushcfunction(L, Lcreate_table); | 66 lua_pushcfunction(L, Lcreate_table); |
67 lua_setfield(L, -2, "create"); | 67 lua_setfield(L, -2, "create"); |
68 lua_pushcfunction(L, Lpack); | 68 lua_pushcfunction(L, Lpack); |
69 lua_setfield(L, -2, "pack"); | 69 lua_setfield(L, -2, "pack"); |
70 lua_pushcfunction(L, Lmove); | 70 lua_pushcfunction(L, Lmove); |
71 lua_setfield(L, -2, "move"); | 71 lua_setfield(L, -2, "move"); |
72 return 1; | 72 return 1; |
73 } | 73 } |
74 | |
75 int luaopen_util_table(lua_State *L) { | |
76 return luaopen_prosody_util_table(L); | |
77 } |