PCRE2_MAKETABLES(3)
π NAME π
okay so this is the PCRE2_MAKETABLES(3) page in the Library Functions Manual β hi bestie, welcome to the PCRE2 library π
PCRE2β Perl-compatible regular expressions (revised API)
β¨ SYNOPSIS β¨
#include <pcre2.h>
const uint8_t *pcre2_maketables(pcre2_general_context *gcontext);
π DESCRIPTION π
So the way that pcre2_maketables() works is: it builds a set of character tables for character code points that are less than 256. That's the assignment, and it ate, no cap β lowkey iconic. π«Ά
These tables can be passed to pcre2_compile() in a compile context in order to override the internal, built-in tables β the ones that were either defaulted or made by pcre2_maketables() when PCRE2 was compiled. See the pcre2_set_character_tables() page. You might want to do this if you are using a non-standard locale β it's giving custom-locale energy, and highkey slay. π
Now for the argument energy: if the argument is NULL, malloc() is used to get memory for the tables. Otherwise it must point to a general context, which can supply pointers to a custom memory manager. The function yields a pointer to the tables. Vibe check: pointer to tables, periodt β ngl, that's main character energy π
Also, 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. Go read those if you want the full lore β¨
I'm literally obsessed with how this whole page is just one function, fr fr. π¦
Signing off from the PCRE2_MAKETABLES(3) page: this one is from PCRE2 10.47, dated 26 February 2025 β mwah, bestie ππ
π¦ where this page comes from
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 43: pcre2-devel 10.47-1.fc43 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- fedora 44: pcre2-devel 10.47-1.fc44.1 Β· BSD-3-Clause AND FSFULLR AND X11 AND GPL-2.0-or-later AND FSFAP AND FSFUL AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms