summaryrefslogtreecommitdiff
path: root/pom.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-16 20:49:49 -0400
committerpommicket <pommicket@gmail.com>2025-09-16 20:52:22 -0400
commitea7b73aac55177d1d556d0c9dba04b0870d3aaf6 (patch)
tree98862ab518680573c4d1d77542bc88b5ec9ceb2a /pom.h
parent62bb1ffdee060819657161e260e75e3e1df017ac (diff)
Allow short reads from read_func
Diffstat (limited to 'pom.h')
-rw-r--r--pom.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/pom.h b/pom.h
index 8ae9ff1..e7f8777 100644
--- a/pom.h
+++ b/pom.h
@@ -138,9 +138,9 @@ typedef struct pom_settings {
///
/// `read_func` will be passed the `userdata` pointer passed to this function,
/// a buffer, and the length of that buffer (which will be nonzero).
-/// It must fill out the buffer as much as possible,
-/// and return the number of bytes read.
-/// A return value less than `len` indicates the end of the file was reached.
+/// It returns the number of bytes read, or 0 if the end of the file was reached.
+/// It can fill out as much or as little of the buffer as it wants —
+/// a short read count is not interpreted as the end of the file.
/// `read_func` will not be called excessively/with lots of tiny reads—it's
/// okay to do unbuffered reads in it.
///