diff options
author | pommicket <pommicket@gmail.com> | 2025-09-16 20:49:49 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-16 20:52:22 -0400 |
commit | ea7b73aac55177d1d556d0c9dba04b0870d3aaf6 (patch) | |
tree | 98862ab518680573c4d1d77542bc88b5ec9ceb2a /pom.h | |
parent | 62bb1ffdee060819657161e260e75e3e1df017ac (diff) |
Allow short reads from read_func
Diffstat (limited to 'pom.h')
-rw-r--r-- | pom.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. /// |