Tencent / xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
Other
9.43k stars 2.46k forks source link

isMethodInBlackList IsPointer type Bug #1167

Open waytoeden opened 2 months ago

waytoeden commented 2 months ago

xLua/Assets/XLua/Src /CodeEmit.cs

static bool isMethodInBlackList(MethodBase mb)
        {
            if (mb.GetParameters().Any(pInfo => pInfo.ParameterType.IsPointer)) return true;
            if (mb is MethodInfo && (mb as MethodInfo).ReturnType.IsPointer) return false;     // ????

            if (mb.IsDefined(typeof(BlackListAttribute), false) || mb.IsDefined(typeof(ObsoleteAttribute), false)) return true;

            return BlackList.Contains(mb);
        }

if (mb is MethodInfo && (mb as MethodInfo).ReturnType.IsPointer) return true;