152 const char *source,
size_t source_len,
203 const char *source,
int source_len);
218 size_t *out_size,
size_t *out_max);
void dynamic_pattern_release(dynamic_pattern_t *pattern)
Decrement reference count and free if zero.
dynamic_pattern_t * dynamic_pattern_cache_get(dynamic_pattern_cache_t *cache, const char *source, int source_len)
Look up a pattern in the cache.
dynamic_pattern_t * dynamic_pattern_create(const char *source, uint8_t *bc, size_t bc_len)
Create a new dynamic pattern object.
struct dynamic_pattern dynamic_pattern_t
void dynamic_pattern_cache_stats(const dynamic_pattern_cache_t *cache, size_t *out_size, size_t *out_max)
Get cache statistics.
void dynamic_pattern_cache_clear(dynamic_pattern_cache_t *cache)
Clear all entries from the cache.
bool dynamic_pattern_cache_remove(dynamic_pattern_cache_t *cache, const char *source, int source_len)
Remove a pattern from the cache.
uint32_t dynamic_pattern_hash_source(const char *source, size_t len)
Hash function for pattern sources.
const dynamic_pattern_cache_key_t * dynamic_pattern_compute_key(const char *source, size_t source_len, dynamic_pattern_cache_key_t *out_key)
Compute canonical cache key from source string.
void dynamic_pattern_cache_destroy(dynamic_pattern_cache_t *cache)
Destroy cache and free all entries.
struct dynamic_pattern_cache_entry dynamic_pattern_cache_entry_t
bool dynamic_pattern_cache_init(dynamic_pattern_cache_t *cache, size_t max_size)
Initialize dynamic pattern cache.
dynamic_pattern_t * dynamic_pattern_retain(dynamic_pattern_t *pattern)
Increment dynamic pattern reference count.
struct snobol_table snobol_table_t
Associative table (opaque handle).
bool dynamic_pattern_cache_put(dynamic_pattern_cache_t *cache, const char *source, dynamic_pattern_t *pattern)
Insert a pattern into the cache.
dynamic_pattern_t * pattern
struct dynamic_pattern_cache_entry * next
dynamic_pattern_cache_entry_t ** buckets