(RealStatePtr L)
| 64 | } |
| 65 | |
| 66 | [MonoPInvokeCallback(typeof(LuaCSFunction))] |
| 67 | public static int EnumOr(RealStatePtr L) |
| 68 | { |
| 69 | try |
| 70 | { |
| 71 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| 72 | object left = translator.FastGetCSObj(L, 1); |
| 73 | object right = translator.FastGetCSObj(L, 2); |
| 74 | Type typeOfLeft = left.GetType(); |
| 75 | if (!typeOfLeft.IsEnum() || typeOfLeft != right.GetType()) |
| 76 | { |
| 77 | return LuaAPI.luaL_error(L, "invalid argument for Enum BitwiseOr"); |
| 78 | } |
| 79 | translator.PushAny(L, Enum.ToObject(typeOfLeft, Convert.ToInt64(left) | Convert.ToInt64(right))); |
| 80 | return 1; |
| 81 | } |
| 82 | catch (Exception e) |
| 83 | { |
| 84 | return LuaAPI.luaL_error(L, "c# exception in Enum BitwiseOr:" + e); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | [MonoPInvokeCallback(typeof(LuaCSFunction))] |
| 89 | static int StaticCSFunction(RealStatePtr L) |
nothing calls this directly
no test coverage detected