Skip to content

Commit 9a42930

Browse files
committed
Temporary fix
1 parent 5bd2853 commit 9a42930

File tree

12 files changed

+369
-421
lines changed

12 files changed

+369
-421
lines changed

memcached/CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
add_custom_command(
2-
OUTPUT ${CMAKE_SOURCE_DIR}/memcached/internal/proto_text_parser.c
2+
OUTPUT ${CMAKE_SOURCE_DIR}/memcached/internal/proto_txt_parser.c
33
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
4-
COMMAND ${RAGEL} -LCe -G2 memcached/internal/proto_text_parser.rl
5-
-o memcached/internal/proto_text_parser.c
6-
DEPENDS ${CMAKE_SOURCE_DIR}/memcached/internal/proto_text_parser.rl)
4+
COMMAND ${RAGEL} -LCe -G2 memcached/internal/proto_txt_parser.rl
5+
-o memcached/internal/proto_txt_parser.c
6+
DEPENDS ${CMAKE_SOURCE_DIR}/memcached/internal/proto_txt_parser.rl)
77

8-
add_custom_target(generate_proto_text_parser_c DEPENDS
9-
${CMAKE_SOURCE_DIR}/memcached/internal/proto_text_parser.c)
8+
add_custom_target(generate_proto_txt_parser_c DEPENDS
9+
${CMAKE_SOURCE_DIR}/memcached/internal/proto_txt_parser.c)
1010

11-
# do not randomly try to re-generate proto_text_parser.c
11+
# do not randomly try to re-generate proto_txt_parser.c
1212
# after a fresh checkout/branch switch.
1313
execute_process(COMMAND ${CMAKE_COMMAND} -E touch_nocreate
14-
${CMAKE_SOURCE_DIR}/memcached/internal/proto_text_parser.c)
14+
${CMAKE_SOURCE_DIR}/memcached/internal/proto_txt_parser.c)
1515

1616
# set_source_files_properties(
17-
# ${CMAKE_SOURCE_DIR}/memcached/internal/proto_text_parser.c
17+
# ${CMAKE_SOURCE_DIR}/memcached/internal/proto_txt_parser.c
1818
# PROPERTIES HEADER_FILE_ONLY true)
1919

2020
add_library(internalso SHARED
2121
"internal/constants.c"
2222
"internal/utils.c"
23-
"internal/proto_binary.c"
24-
"internal/proto_text_parser.c"
25-
"internal/proto_text.c"
23+
"internal/proto_bin.c"
24+
"internal/proto_txt_parser.c"
25+
"internal/proto_txt.c"
2626
"internal/network.c"
2727
"internal/memcached_layer.c"
2828
"internal/expiration.c"
@@ -31,7 +31,7 @@ add_library(internalso SHARED
3131

3232
set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM true)
3333

34-
add_dependencies(internalso generate_proto_text_parser_c)
34+
add_dependencies(internalso generate_proto_txt_parser_c)
3535

3636
if(NOT SMALL_FOUND)
3737
add_dependencies(internalso small)

memcached/internal/constants.c

Lines changed: 7 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,91 +6,18 @@
66
.verbosity = v, \
77
},
88

9+
#define MEMCACHED_COMMAND_MEMBER(s) #s,
10+
911
struct memcached_response_record memcached_response_record_table[] = {
1012
RESPONSE_CODES(MEMCACHED_RESPONSE_RECORD_MEMBER)
1113
};
12-
const char *memcached_text_cmd_name[] = {
13-
/* 0x00 */ "UNKNOWN",
14-
/* 0x01 */ "SET",
15-
/* 0x02 */ "ADD",
16-
/* 0x03 */ "REPLACE",
17-
/* 0x04 */ "APPEND",
18-
/* 0x05 */ "PREPEND",
19-
/* 0x06 */ "CAS",
20-
/* 0x07 */ "GET",
21-
/* 0x08 */ "GETS",
22-
/* 0x09 */ "DELETE",
23-
/* 0x0a */ "INCR",
24-
/* 0x0b */ "DECR",
25-
/* 0x0c */ "FLUSH",
26-
/* 0x0d */ "STAT",
27-
/* 0x0e */ "VERSION",
28-
/* 0x0f */ "QUIT",
29-
/* 0x10 */ "VERBOSITY",
14+
15+
const char *memcached_txt_cmd_name[] = {
16+
TEXT_COMMANDS(MEMCACHED_COMMAND_MEMBER)
3017
NULL
3118
};
3219

33-
const char *memcached_binary_cmd_name[] = {
34-
/* 0x00 */ "GET",
35-
/* 0x01 */ "SET",
36-
/* 0x02 */ "ADD",
37-
/* 0x03 */ "REPLACE",
38-
/* 0x04 */ "DELETE",
39-
/* 0x05 */ "INCR",
40-
/* 0x06 */ "DECR",
41-
/* 0x07 */ "QUIT",
42-
/* 0x08 */ "FLUSH",
43-
/* 0x09 */ "GETQ",
44-
/* 0x0a */ "NOOP",
45-
/* 0x0b */ "VERSION",
46-
/* 0x0c */ "GETK",
47-
/* 0x0d */ "GETKQ",
48-
/* 0x0e */ "APPEND",
49-
/* 0x0f */ "PREPEND",
50-
/* 0x10 */ "STAT",
51-
/* 0x11 */ "SETQ",
52-
/* 0x12 */ "ADDQ",
53-
/* 0x13 */ "REPLACEQ",
54-
/* 0x14 */ "DELETEQ",
55-
/* 0x15 */ "INCRQ",
56-
/* 0x16 */ "DECRQ",
57-
/* 0x17 */ "QUITQ",
58-
/* 0x18 */ "FLUSHQ",
59-
/* 0x19 */ "APPENDQ",
60-
/* 0x1a */ "PREPENDQ",
61-
/* 0x1b */ "VERBOSITY",
62-
/* 0x1c */ "TOUCH",
63-
/* 0x1d */ "GAT",
64-
/* 0x1e */ "GATQ",
65-
/* 0x1f */ "",
66-
/* 0x20 */ "SASL_LIST_MECHS",
67-
/* 0x21 */ "SASL_AUTH",
68-
/* 0x22 */ "SASL_STEP",
69-
/* 0x23 */ "GATK",
70-
/* 0x24 */ "GATKQ",
71-
/* 0x25 */ "",
72-
/* 0x26 */ "",
73-
/* 0x27 */ "",
74-
/* 0x28 */ "",
75-
/* 0x29 */ "",
76-
/* 0x2a */ "",
77-
/* 0x2b */ "",
78-
/* 0x2c */ "",
79-
/* 0x2d */ "",
80-
/* 0x2e */ "",
81-
/* 0x2f */ "",
82-
/* 0x30 */ "RGET",
83-
/* 0x31 */ "RSET",
84-
/* 0x32 */ "RSETQ",
85-
/* 0x33 */ "RAPPEND",
86-
/* 0x34 */ "RAPPENDQ",
87-
/* 0x35 */ "RPREPEND",
88-
/* 0x36 */ "RPREPENDQ",
89-
/* 0x37 */ "RDELETE",
90-
/* 0x38 */ "RDELETEQ",
91-
/* 0x39 */ "RINCR",
92-
/* 0x3a */ "RINCRQ",
93-
/* 0x3b */ "RDECR",
94-
/* 0x3c */ "RDECRQ",
20+
const char *memcached_bin_cmd_name[] = {
21+
BINARY_COMMANDS(MEMCACHED_COMMAND_MEMBER)
9522
NULL
9623
};

0 commit comments

Comments
 (0)