(RealStatePtr L)
| 42 | } |
| 43 | |
| 44 | [MonoPInvokeCallback(typeof(LuaCSFunction))] |
| 45 | public static int EnumAnd(RealStatePtr L) |
| 46 | { |
| 47 | try |
| 48 | { |
| 49 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| 50 | object left = translator.FastGetCSObj(L, 1); |
| 51 | object right = translator.FastGetCSObj(L, 2); |
| 52 | Type typeOfLeft = left.GetType(); |
| 53 | if (!typeOfLeft.IsEnum() || typeOfLeft != right.GetType()) |
| 54 | { |
| 55 | return LuaAPI.luaL_error(L, "invalid argument for Enum BitwiseAnd"); |
| 56 | } |
| 57 | translator.PushAny(L, Enum.ToObject(typeOfLeft, Convert.ToInt64(left) & Convert.ToInt64(right))); |
| 58 | return 1; |
| 59 | } |
| 60 | catch (Exception e) |
| 61 | { |
| 62 | return LuaAPI.luaL_error(L, "c# exception in Enum BitwiseAnd:" + e); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | [MonoPInvokeCallback(typeof(LuaCSFunction))] |
| 67 | public static int EnumOr(RealStatePtr L) |
nothing calls this directly
no test coverage detected