PCRE32_PATTERN_TO_HOST_BYTE_ORDER(3)
π PCRE16_PATTERN_TO_HOST_BYTE_ORDER(3) π
omg hey bestie, this one's from the Library Functions Manual and it's all about the PCRE crew π«Άβ¨
π·οΈ NAME
PCRE β Perl-compatible regular expressions π
π SYNOPSIS
#include <pcre.h>
int pcre_pattern_to_host_byte_order(pcre *code,
pcre_extra *extra, const unsigned char *tables);
int pcre16_pattern_to_host_byte_order(pcre16 *code,
pcre16_extra *extra, const unsigned char *tables);
int pcre32_pattern_to_host_byte_order(pcre32 *code,
pcre32_extra *extra, const unsigned char *tables);
π DESCRIPTION
okay so real talk: this function is literally here to make sure the bytes sitting inside 2-byte and 4-byte values in a compiled pattern are in the correct order for the current host. it's the moment when a pattern gets compiled on one machine and then yeeted over to another machine that might have different endianness β and this function is the one that fixes it all up. π β¨
The arguments are:
codeβ a compiled regular expression πextraβ points to an associatedpcre[16|32]_extrastructure, or isNULLπtablesβ pointer to character tables, orNULLto set the built-in default π
The result is 0 for success, or a negative PCRE_ERROR_xxx value otherwise. no cap, that's just how it is. π
There's a complete description of the PCRE native API over in the pcreapi page, and a description of the POSIX API in the pcreposix page. go read them, they're iconic πβ¨
okay that's the whole vibe bestie!! this page is PCRE 8.30, dated 24 June 2012, and it's the PCRE_PATTE..._BYTE_ORDER(3) page. slay, bye π
π
π¦ where this page comes from
- alpine 3.22: pcre-doc 8.45-r4 Β· BSD-3-Clause
- alpine 3.23: pcre-doc 8.45-r4 Β· BSD-3-Clause
- alpine 3.24: pcre-doc 8.45-r4 Β· BSD-3-Clause
- arch rolling: pcre 8.45-5 Β· BSD
- centos-stream 9: pcre-devel 8.44-4.el9 Β· BSD
- centos-stream 9: pcre-devel 8.44-4.el9 Β· BSD
- debian bookworm: libpcre3-dev 2:8.39-15
- fedora 43: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 43: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 44: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- fedora 44: pcre-devel 8.45-1.fc43.9 Β· BSD-3-Clause
- nixos 26.05: pcre 8.45
- nixos 26.05: pcre-cpp 8.45
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: pcre-devel 8.45-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libpcre3-dev 2:8.39-13build5
- ubuntu jammy: libpcre3-dev 2:8.39-13ubuntu0.22.04.1
- ubuntu noble: libpcre3-dev 2:8.39-15build1
- ubuntu questing: libpcre3-dev 2:8.39-15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms