public static bool CheckBinaryString(IntPtr ptr, int p, out byte[] bytes)
        {
            if (LuaNativeMethods.lua_isstring(ptr, p))
            {
                bytes = LuaNativeMethods.lua_tobytes(ptr, p);
                return(true);
            }

            bytes = null;
            return(false);
        }