summaryrefslogtreecommitdiffstats
path: root/tests/012/oop-seq.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-06-24 23:00:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-06-24 23:00:34 -0700
commit54d8de908450b105b3c63fd14ea291b52b15f4e7 (patch)
treeb9d62079002492f4abe1459b055b318f62e9bf69 /tests/012/oop-seq.tl
parentd4e474f7179c54c985aa912328d1dff8dbfe7d40 (diff)
downloadtxr-54d8de908450b105b3c63fd14ea291b52b15f4e7.tar.gz
txr-54d8de908450b105b3c63fd14ea291b52b15f4e7.tar.bz2
txr-54d8de908450b105b3c63fd14ea291b52b15f4e7.zip
txr: deal with spurious retention problem.
When we open a data source using @(next), or use one implicitly at the top level of the script, we would like the top level scanning construct as @(collect) or @(repeat) which does not backtrack not to consume memmory when moving through a large file. I experimented with ways to fix this in the past that were ineffective, but I think I hit upon a working approach. * match.c (match_files_ctx): Make the data field (pointer to lazy list data source) volatile. (match_files_byref): New function, based on converting match_files to take a context by pointer rather than by value. (match_files): By-value wrapper for match_files_byref that most constructs use. (v_next_impl): When opening a stream source, use match_files_byref to avoid possible duplication of the structure. Without the volatile in match_files_ctx, this doesn't squelch all spurious retention.
Diffstat (limited to 'tests/012/oop-seq.tl')
0 files changed, 0 insertions, 0 deletions