summaryrefslogtreecommitdiffstats
path: root/chksum.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-07 12:11:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-07 12:11:54 -0700
commitb7d944377a6674e7fd8c6236f2b957a31c2eccde (patch)
tree352a588c225d44b0472875bbb28fd0585d17f04f /chksum.c
parentfbcdc0c91be3700391a3f0294f87c26f2781944d (diff)
downloadtxr-b7d944377a6674e7fd8c6236f2b957a31c2eccde.tar.gz
txr-b7d944377a6674e7fd8c6236f2b957a31c2eccde.tar.bz2
txr-b7d944377a6674e7fd8c6236f2b957a31c2eccde.zip
streams: close-stream only caches non-nil result.
This is motivated by trying to implement a struct delegate stream which performs reference counting in close, in order to close the real stream when the count hits zero. The caching behavior of close-stream is a problem. * stream.c (strm_base_init): Initialize close_result to nil, rather than nao. (strm_base_mark): Don't check close_result for nao. (close_stream): Suppress the call to op->close if close_result has a non-nil value, rather than a value other than nao. * tests/018/close-delegate.tl, * tests/018/close-delegate.expected: New files. * txr.1: Document that only a non-nil return is cached by close-stream.
Diffstat (limited to 'chksum.c')
0 files changed, 0 insertions, 0 deletions