X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcsl%2Fcontext.h;h=12e028ddcaeac95c74c33073e273d3957a1cff50;hb=40353ce2b76875202b3d37ad32c645ec18933bed;hp=94f6813463f364d252a41d4343cedb32ee084e07;hpb=a4f7c3b9413014291d0ca549f32455b3be10a6c0;p=awesomized%2Flibmemcached diff --git a/libmemcached/csl/context.h b/libmemcached/csl/context.h index 94f68134..12e028dd 100644 --- a/libmemcached/csl/context.h +++ b/libmemcached/csl/context.h @@ -52,7 +52,8 @@ public: memc(NULL), rc(rc_arg), _is_server(false), - _end(false) + _end(false), + _has_hash(false) { _hostname[0]= 0; buf= option_string; @@ -60,6 +61,8 @@ public: memc= memc_arg; init_scanner(); rc= MEMCACHED_SUCCESS; + + memc->state.is_parsing= true; } bool end() @@ -75,6 +78,8 @@ public: _end= true; } + bool set_hash(memcached_hash_t hash); + void set_server() { _is_server= true; @@ -85,14 +90,14 @@ public: _is_server= false; } - bool is_server() + bool is_server() const { return _is_server; } const char *set_hostname(const char *str, size_t size); - const char *hostname() + const char *hostname() const { return _hostname; } @@ -103,6 +108,7 @@ public: ~Context() { destroy_scanner(); + memc->state.is_parsing= false; } yytokentype previous_token; @@ -122,4 +128,5 @@ private: bool _is_server; bool _end; char _hostname[NI_MAXHOST]; + bool _has_hash; };