From 107bb9d2edb8d44beacde099be169383563af23d Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Wed, 5 Sep 2018 13:09:57 +0200 Subject: [PATCH] elua: fix outdated code in doc token ref resolution This function was using outdated enum fields. This was fixed on my local side but somehow never made it in, so make this code make sense. --- src/bindings/luajit/eolian.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 78fcfd6b6d..a0837e7bdc 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -1663,25 +1663,21 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", { local reft = M.object_type if tp == reft.CLASS then return tp, ffi.cast("const Eolian_Class *", stor[0]) - elseif tp == reft.FUNC then + elseif tp == reft.FUNCTION then return tp, ffi.cast("const Eolian_Class *", stor[0]), ffi.cast("const Eolian_Function *", stor[1]) elseif tp == reft.EVENT then return tp, ffi.cast("const Eolian_Class *", stor[0]), ffi.cast("const Eolian_Event *", stor[1]) - elseif tp == reft.ALIAS then - return tp, ffi.cast("const Eolian_Typedecl *", stor[0]) - elseif tp == reft.STRUCT then + elseif tp == reft.TYPEDECL then return tp, ffi.cast("const Eolian_Typedecl *", stor[0]) elseif tp == reft.STRUCT_FIELD then return tp, ffi.cast("const Eolian_Typedecl *", stor[0]), ffi.cast("const Eolian_Struct_Type_Field *", stor[1]) - elseif tp == reft.ENUM then - return tp, ffi.cast("const Eolian_Typedecl *", stor[0]) elseif tp == reft.ENUM_FIELD then return tp, ffi.cast("const Eolian_Typedecl *", stor[0]), ffi.cast("const Eolian_Enum_Type_Field *", stor[1]) - elseif tp == reft.VAR then + elseif tp == reft.VARIABLE then return tp, ffi.cast("const Eolian_Variable *", stor[0]) else return reft.UNKNOWN