From: Brian Aker Date: Sun, 27 Mar 2011 00:29:14 +0000 (-0700) Subject: Merge in change such that we now use "config_" as the prepend on the X-Git-Tag: 0.51~15^2~71 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0383808588783dbc9f7d66c5f9a0ea935cc574e5;p=awesomized%2Flibmemcached Merge in change such that we now use "config_" as the prepend on the parser/scanner. --- diff --git a/libmemcached/get.c b/libmemcached/get.c index 13fe6079..7cb5ec04 100644 --- a/libmemcached/get.c +++ b/libmemcached/get.c @@ -374,7 +374,7 @@ static memcached_return_t simple_binary_mget(memcached_st *ptr, { memcached_return_t rc= MEMCACHED_NOTFOUND; - int flush= number_of_keys == 1; + bool flush= (number_of_keys == 1); /* If a server fails we warn about errors and start all over with sending keys diff --git a/libmemcached/options/parser.yy b/libmemcached/options/parser.yy index fb7ccd86..6145ec72 100644 --- a/libmemcached/options/parser.yy +++ b/libmemcached/options/parser.yy @@ -25,7 +25,7 @@ %output "libmemcached/options/parser.cc" %defines "libmemcached/options/parser.h" %lex-param { yyscan_t *scanner } -%name-prefix="libmemcached_" +%name-prefix="config_" %parse-param { Context *context } %parse-param { yyscan_t *scanner } %pure-parser @@ -49,20 +49,21 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #include -int libmemcached_lex(YYSTYPE* lvalp, void* scanner); +int conf_lex(YYSTYPE* lvalp, void* scanner); #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0) -inline void libmemcached_error(Context *context, yyscan_t *scanner, const char *error) +inline void config_error(Context *context, yyscan_t *scanner, const char *error) { if (not context->end()) parser::abort_func(context, error); } -int libmemcached_parse(Context*, yyscan_t *); +int config_parse(Context*, yyscan_t *); + void Context::start() { - libmemcached_parse(this, scanner); + config_parse(this, scanner); } %} diff --git a/libmemcached/options/scanner.l b/libmemcached/options/scanner.l index b653c460..67fdb96d 100644 --- a/libmemcached/options/scanner.l +++ b/libmemcached/options/scanner.l @@ -60,6 +60,7 @@ static void get_lex_chars(char* buffer, int& result, int max_size, Context *cont %} +%option 8bit %option bison-bridge %option case-insensitive %option debug @@ -67,7 +68,7 @@ static void get_lex_chars(char* buffer, int& result, int max_size, Context *cont %option noyywrap %option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h" %option perf-report -%option prefix="libmemcached_" +%option prefix="config_" %option reentrant %%