projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Small cleanup in string.h and converted result_st macro to inline.
[awesomized/libmemcached]
/
libmemcached
/
string.h
diff --git
a/libmemcached/string.h
b/libmemcached/string.h
index 9a9872645110ecb6112441eaa7b0b3a6a31f914a..39a8677364b92f530b071e2e9bacd0c3eeb5e7dd 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 {
memcached_st *root;
char *end;
char *string;
size_t current_size;
struct memcached_string_st {
memcached_st *root;
char *end;
char *string;
size_t current_size;
- size_t block_size;
struct {
bool is_allocated:1;
bool is_initialized:1;
struct {
bool is_allocated:1;
bool is_initialized:1;