]> git.saurik.com Git - redis.git/blobdiff - sds.h
Fixed a lame epoll issue
[redis.git] / sds.h
diff --git a/sds.h b/sds.h
index 582cb2f34773988d0793089687c3b4dd11537555..0d296ff781fe7d1773857808caf5ba9e81413fa5 100644 (file)
--- a/sds.h
+++ b/sds.h
 #define __SDS_H
 
 #include <sys/types.h>
-#include <limits.h>
 
 typedef char *sds;
 
 struct sdshdr {
-    int len;
-    unsigned short free;
-    unsigned short _len; /* USHRT_MAX if it is a "long" sds string */
+    long len;
+    long free;
     char buf[];
 };
 
@@ -54,7 +52,14 @@ sds sdscatlen(sds s, void *t, size_t len);
 sds sdscat(sds s, char *t);
 sds sdscpylen(sds s, char *t, size_t len);
 sds sdscpy(sds s, char *t);
+
+#ifdef __GNUC__
+sds sdscatprintf(sds s, const char *fmt, ...)
+    __attribute__((format(printf, 2, 3)));
+#else
 sds sdscatprintf(sds s, const char *fmt, ...);
+#endif
+
 sds sdstrim(sds s, const char *cset);
 sds sdsrange(sds s, long start, long end);
 void sdsupdatelen(sds s);