mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 00:02:24 +03:00
Provide access to scratch in queues
This largely reverts commit f8ecf33236b0695d9539e8e34cf0bb0467614cdf.
This commit is contained in:
@@ -227,6 +227,11 @@ hs_error_t alloc_scratch(const hs_scratch_t *proto, hs_scratch_t **scratch) {
|
||||
// Don't get too big for your boots
|
||||
assert((size_t)(current - (char *)s) <= alloc_size);
|
||||
|
||||
// Init q->scratch ptr for every queue.
|
||||
for (struct mq *qi = s->queues; qi != s->queues + queueCount; ++qi) {
|
||||
qi->scratch = s;
|
||||
}
|
||||
|
||||
return HS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user