ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
pcre2_singleton Struct Reference

Represents a thread-safe compiled PCRE2 regex singleton. More...

Data Fields

lifecycle_t lc
 Per-object compilation lifecycle (UNINITIALIZED → INITIALIZED)
 
atomic_t code
 Compiled regex (lazy init, atomic pointer as uint64_t)
 
pcre2_jit_stack * jit_stack
 JIT stack for performance.
 
char * pattern
 Pattern string (owned by singleton, dynamically allocated)
 
uint32_t flags
 PCRE2 compile flags.
 
struct pcre2_singleton * next
 Next singleton in global registry.
 

Detailed Description

Represents a thread-safe compiled PCRE2 regex singleton.

Uses lifecycle_t for thread-safe lazy initialization without mutexes. The compilation flag is set only once, and the compiled code is read-only after that, enabling concurrent access from multiple threads.

Definition at line 22 of file pcre2.c.

Field Documentation

◆ code

◆ flags

uint32_t pcre2_singleton::flags

PCRE2 compile flags.

Definition at line 27 of file pcre2.c.

Referenced by asciichat_pcre2_singleton_compile(), and asciichat_pcre2_singleton_get_code().

◆ jit_stack

pcre2_jit_stack* pcre2_singleton::jit_stack

◆ lc

lifecycle_t pcre2_singleton::lc

Per-object compilation lifecycle (UNINITIALIZED → INITIALIZED)

Definition at line 23 of file pcre2.c.

Referenced by asciichat_pcre2_singleton_compile(), and asciichat_pcre2_singleton_get_code().

◆ next

struct pcre2_singleton* pcre2_singleton::next

Next singleton in global registry.

Definition at line 28 of file pcre2.c.

Referenced by asciichat_pcre2_cleanup_all(), and asciichat_pcre2_singleton_compile().

◆ pattern

char* pcre2_singleton::pattern

Pattern string (owned by singleton, dynamically allocated)

Definition at line 26 of file pcre2.c.

Referenced by asciichat_pcre2_cleanup_all(), asciichat_pcre2_singleton_compile(), asciichat_pcre2_singleton_free(), and asciichat_pcre2_singleton_get_code().


The documentation for this struct was generated from the following file: