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; } }
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; } }