X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fstring.h;h=4fc67cfcee859e561f773297ea800041f737a9cb;hb=ce11ec5eadbc51ff26aa6b64f52cf36e6b703f46;hp=9a9872645110ecb6112441eaa7b0b3a6a31f914a;hpb=d4a0e93c0478a1a1d16e650ec9e5d69255e28d45;p=awesomized%2Flibmemcached diff --git a/libmemcached/string.h b/libmemcached/string.h index 9a987264..4fc67cfc 100644 --- a/libmemcached/string.h +++ b/libmemcached/string.h @@ -16,12 +16,21 @@ 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; - size_t block_size; + const memcached_st *root; struct { bool is_allocated:1; bool is_initialized:1;