projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9c6f39
)
comment on top of the _rio structure modified for correctness as actually fwrite...
author
antirez
<antirez@gmail.com>
Thu, 22 Sep 2011 13:47:48 +0000
(15:47 +0200)
committer
antirez
<antirez@gmail.com>
Thu, 22 Sep 2011 13:47:48 +0000
(15:47 +0200)
src/rio.h
patch
|
blob
|
blame
|
history
diff --git
a/src/rio.h
b/src/rio.h
index fe863cb52f6a9bf660d27e879c1464b6a4c79bde..654423810025b257291a59af6543a72910cf56ad 100644
(file)
--- a/
src/rio.h
+++ b/
src/rio.h
@@
-5,8
+5,9
@@
#include "sds.h"
struct _rio {
#include "sds.h"
struct _rio {
- /* Backend functions. Both read and write should return 0 for short reads
- * or writes, identical to the return values of fread/fwrite. */
+ /* Backend functions.
+ * Since this functions do not tolerate short writes or reads the return
+ * value is simplified to: zero on error, non zero on complete success. */
size_t (*read)(struct _rio *, void *buf, size_t len);
size_t (*write)(struct _rio *, const void *buf, size_t len);
off_t (*tell)(struct _rio *);
size_t (*read)(struct _rio *, void *buf, size_t len);
size_t (*write)(struct _rio *, const void *buf, size_t len);
off_t (*tell)(struct _rio *);