PCRE2_SET_CALLOUT(3)

πŸ’… NAME πŸ’…

PCRE2 - Perl-compatible regular expressions (revised API). This is the PCRE2_SET_CALLOUT(3) page from the Library Functions Manual, and it's here to explain the set-callout function, bestie 🫢✨

✨ SYNOPSIS ✨

       #include <pcre2.h>

       int pcre2_set_callout(pcre2_match_context *mcontext,
         int (*callout_function)(pcre2_callout_block *),
         void *callout_data);

🌸 DESCRIPTION 🌸

okay so pcre2_set_callout() sets the callout fields in a match context β€” that's the first argument, mcontext β€” and it's giving "configure the callout setup" energy πŸ’…

  • mcontext β€” the match context whose callout fields get set (the first argument).
  • callout_function β€” the second argument specifies a callout function, with the type int (*callout_function)(pcre2_callout_block *).
  • callout_data β€” the third argument is an opaque data item that is passed to the callout function.

The result of this function is always zero. always. zero. no cap 🫢✨

There's a complete description of the PCRE2 native API in the pcre2api page, and a description of the POSIX API in the pcre2posix page. iykyk πŸ“š


cute sign-off: PCRE2 10.47 🌸 25 March 2017 🌸 PCRE2_SET_CALLOUT(3) β€” mwah, go slay your regex callouts πŸ’–

πŸ“¦ where this page comes from