mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 16:51:22 +00:00
Stop using /dev/null to find out the serialized object length
Now the rdbSave* functions return the number of bytes written (or required to write) in serializing a Redis object, writing to /dev/null and using ftell (which doesn't work on FreeBSD) isn't needed anymore.
This commit is contained in:
@ -481,7 +481,6 @@ struct redisServer {
|
||||
dict *pubsub_channels; /* Map channels to list of subscribed clients */
|
||||
list *pubsub_patterns; /* A list of pubsub_patterns */
|
||||
/* Misc */
|
||||
FILE *devnull;
|
||||
unsigned lruclock:22; /* clock incrementing every minute, for LRU */
|
||||
unsigned lruclock_padding:10;
|
||||
};
|
||||
@ -743,8 +742,8 @@ int rdbSaveBackground(char *filename);
|
||||
void rdbRemoveTempFile(pid_t childpid);
|
||||
int rdbSave(char *filename);
|
||||
int rdbSaveObject(FILE *fp, robj *o);
|
||||
off_t rdbSavedObjectPages(robj *o, FILE *fp);
|
||||
off_t rdbSavedObjectLen(robj *o, FILE *fp);
|
||||
off_t rdbSavedObjectLen(robj *o);
|
||||
off_t rdbSavedObjectPages(robj *o);
|
||||
robj *rdbLoadObject(int type, FILE *fp);
|
||||
void backgroundSaveDoneHandler(int statloc);
|
||||
|
||||
|
Reference in New Issue
Block a user