]> git.lizzy.rs Git - minetest.git/commitdiff
Fix incorrect deprecation hints
authorSmallJoker <mk939@ymail.com>
Sun, 1 Nov 2020 11:52:09 +0000 (12:52 +0100)
committerSmallJoker <mk939@ymail.com>
Sun, 1 Nov 2020 11:52:14 +0000 (12:52 +0100)
"good" and "bad" were swapped in the process, resulting in wrong deprecation messages

src/script/lua_api/l_internal.h

index a10c259ba3c4c450af03d50e8e28c5ddee41fdbf..672e535ca56b9a85f3a728e3a5aa7cabc56be7ac 100644 (file)
@@ -32,12 +32,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #define luamethod_dep(class, good, bad)                                     \
                {#bad, [](lua_State *L) -> int {                                    \
-                       return l_deprecated_function(L, #bad, #good, &class::l_##good); \
+                       return l_deprecated_function(L, #good, #bad, &class::l_##good); \
                }}
 
-#define luamethod_aliased(class, name, alias) \
-               luamethod(class, name),               \
-               luamethod_dep(class, name, alias)
+#define luamethod_aliased(class, good, bad) \
+               luamethod(class, good),               \
+               luamethod_dep(class, good, bad)
 
 #define API_FCT(name) registerFunction(L, #name, l_##name, top)