login

<     >

2023-11-09 22:25:22 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

net: add shorthand access for ENET_ consts

diff --git a/lib/arco/enet.lua b/lib/arco/enet.lua
index 1b0fa43..28aca1c 100644
--- a/lib/arco/enet.lua
+++ b/lib/arco/enet.lua
@@ -55,6 +55,9 @@ return setmetatable(consts, {
     __index = function (t, k)
         local ok, obj = pcall(function () return enet["enet_"..k] end)
         if not ok then
+            ok, obj = pcall(function () return enet["ENET_"..k] end)
+        end
+        if not ok then
             obj = enet[k]
         end
         return obj