示例#1
0
        public static void Prepare(string subject, InternalRegex regex, ref Native.dfa_match_input input, out CalloutInteropInfo interopInfo, Func <PcreCallout, PcreCalloutResult> callout)
        {
            if (callout != null)
            {
                interopInfo = new CalloutInteropInfo(subject, regex, callout);

                input.callout      = _calloutHandlerFnPtr;
                input.callout_data = interopInfo.ToPointer();
            }
            else
            {
                interopInfo   = default;
                input.callout = null;
            }
        }
示例#2
0
        public static void Prepare(ReadOnlySpan <char> subject, InternalRegex regex, ref Native.match_input input, out CalloutInteropInfo interopInfo, PcreRefCalloutFunc callout)
        {
            if (callout != null)
            {
                interopInfo = new CalloutInteropInfo(subject, regex, callout);

                input.callout      = _calloutHandlerFnPtr;
                input.callout_data = interopInfo.ToPointer();
            }
            else
            {
                interopInfo   = default;
                input.callout = null;
            }
        }