First pass for performance improvement on _clone() operations.
[awesomized/libmemcached] / libmemcached / string.h
index 03a5bf8a5f7f8f543288bb754f19e963e904ffec..4fc67cfcee859e561f773297ea800041f737a9cb 100644 (file)
 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;