X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fstring.h;h=4fc67cfcee859e561f773297ea800041f737a9cb;hb=ce11ec5eadbc51ff26aa6b64f52cf36e6b703f46;hp=03a5bf8a5f7f8f543288bb754f19e963e904ffec;hpb=8109655bcf53e810c90244a35615e6900aafa525;p=awesomized%2Flibmemcached diff --git a/libmemcached/string.h b/libmemcached/string.h index 03a5bf8a..4fc67cfc 100644 --- a/libmemcached/string.h +++ b/libmemcached/string.h @@ -16,13 +16,21 @@ extern "C" { #endif -LIBMEMCACHED_LOCAL +/** + 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;