From 5744d856e69f0fd1c518ad5ab6af716ac530382f Mon Sep 17 00:00:00 2001 From: ame Date: Wed, 14 Jan 2026 06:46:01 -0600 Subject: thread:detach and buffer __index improvments --- docs/thread/buffer.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/thread/buffer.md b/docs/thread/buffer.md index e366a33..65af0c0 100644 --- a/docs/thread/buffer.md +++ b/docs/thread/buffer.md @@ -12,6 +12,19 @@ the __index metamethod will index any value that is not a buffer.* method on the every other metamethod will be replaced with a proxy to the metamethod in the copied object +inner functions can be called using the : syntactic sugar + +``` +buffer = llby.thread.buffer(llby.crypto.sha1()) + +buffer:set(buffer:get():update("awa")) +--or +buffer:set(buffer.update(buffer:get(), "awa")) + +--is the same as +buffer:set(buffer:update("awa")) +``` + ### buffer:get buffer:get() -- cgit v1.2.3