public static int GetInt(ref LuaJitTValue tv) { #if UNITY_IPHONE || UNITY_TVOS || UNITY_ANDROID if (IsIntType(ref tv)) { return(tv.i); } else { return((int)tv.n); } #else return((int)tv.n); #endif }
public static bool IsIntType(ref LuaJitTValue tv) { #if UNITY_IPHONE || UNITY_TVOS if (GC64) { return(((UInt32)(tv.it64 >> 47)) == LJ_TISNUM); } else { return(tv.it == LJ_TISNUM); } #elif UNITY_ANDROID return(LJ_DUALNUM && tv.it == LJ_TISNUM); #else return(false); #endif }