PCRE2_MATC...EXT_CREATE(3)

🌸 NAME 🌸

okay bestie, welcome to the PCRE2_MATC...EXT_CREATE(3) page from the Library Functions Manual β€” and the NAME is literally:

PCRE2 - Perl-compatible regular expressions (revised API) πŸ’…


✨ SYNOPSIS ✨

the whole summoning spell is right here:

#include <pcre2.h>

pcre2_match_context *pcre2_match_context_create(
  pcre2_general_context *gcontext);

πŸ¦‹ DESCRIPTION πŸ¦‹

so pcre2_match_context_create() creates and initializes a fresh new match context β€” iconic behavior, honestly πŸ‘‘.

if its argument is NULL, malloc() is used to get the necessary memory; otherwise, the memory allocation function within the general context is used 🫢.

and if the memory could not be obtained? the result is NULL β€” that's the whole story, no cap πŸ’€.

for the full lore: there is a complete description of the PCRE2 native API in the pcre2api page, and a description of the POSIX API in the pcre2posix page 🌈.


mwah πŸ’‹ β€” source/version is PCRE2 10.47, dated 25 October 2014. bye bestie, go create that context πŸŽ€

πŸ“¦ where this page comes from