projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Remove mass calloc() on memcached_st creation.
[awesomized/libmemcached]
/
libmemcached
/
string.h
diff --git
a/libmemcached/string.h
b/libmemcached/string.h
index 9a9872645110ecb6112441eaa7b0b3a6a31f914a..4fc67cfcee859e561f773297ea800041f737a9cb 100644
(file)
--- a/
libmemcached/string.h
+++ b/
libmemcached/string.h
@@
-16,12
+16,21
@@
extern "C" {
#endif
extern "C" {
#endif
+/**
+ Strings are always under our control so we make some assumptions
+ about them.
+
+ 1) is_initialized is always valid.
+ 2) A string once intialized will always be, until free where we
+ unset this flag.
+ 3) A string always has a root.
+*/
+
struct memcached_string_st {
struct memcached_string_st {
- memcached_st *root;
char *end;
char *string;
size_t current_size;
char *end;
char *string;
size_t current_size;
-
size_t block_size
;
+
const memcached_st *root
;
struct {
bool is_allocated:1;
bool is_initialized:1;
struct {
bool is_allocated:1;
bool is_initialized:1;