xLua icon indicating copy to clipboard operation
xLua copied to clipboard

isMethodInBlackList IsPointer type Bug

Open waytoeden opened this issue 4 months ago • 0 comments

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;

waytoeden avatar Sep 27 '24 02:09 waytoeden