rioInitWithFile nad rioInitWithBuffer functions now take a rio structure pointer to avoid copying a structure to return value to the caller.

This commit is contained in:
antirez
2011-09-22 16:00:40 +02:00
parent 69cecb511f
commit f96a8a8054
5 changed files with 17 additions and 18 deletions

View File

@ -29,8 +29,8 @@ typedef struct _rio rio;
#define rioWrite(rio,buf,len) ((rio)->write((rio),(buf),(len)))
#define rioRead(rio,buf,len) ((rio)->read((rio),(buf),(len)))
rio rioInitWithFile(FILE *fp);
rio rioInitWithBuffer(sds s);
void rioInitWithFile(rio *r, FILE *fp);
void rioInitWithBuffer(rio *r, sds s);
size_t rioWriteBulkCount(rio *r, char prefix, int count);
size_t rioWriteBulkString(rio *r, const char *buf, size_t len);