Comparison

util-src/compat.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 9561:cfc7b2f7251e
comparison
equal deleted inserted replaced
12975:d10957394a3c 12976:a187600ec7d6
17 lua_pushboolean(L, ret == 0); 17 lua_pushboolean(L, ret == 0);
18 lua_replace(L, 1); 18 lua_replace(L, 1);
19 return lua_gettop(L); 19 return lua_gettop(L);
20 } 20 }
21 21
22 int luaopen_util_compat(lua_State *L) { 22 int luaopen_prosody_util_compat(lua_State *L) {
23 lua_createtable(L, 0, 2); 23 lua_createtable(L, 0, 2);
24 { 24 {
25 lua_pushcfunction(L, lc_xpcall); 25 lua_pushcfunction(L, lc_xpcall);
26 lua_setfield(L, -2, "xpcall"); 26 lua_setfield(L, -2, "xpcall");
27 } 27 }
28 return 1; 28 return 1;
29 } 29 }
30
31 int luaopen_util_compat(lua_State *L) {
32 return luaopen_prosody_util_compat(L);
33 }