1- #ifndef TARANTOOL_BOX_MEMCACHED_LAYER_H_INCLUDED
2- #define TARANTOOL_BOX_MEMCACHED_LAYER_H_INCLUDED
1+ #ifndef MEMCACHED_LAYER_H_INCLUDED
2+ #define MEMCACHED_LAYER_H_INCLUDED
33
44struct memcached_connection ;
55
@@ -21,66 +21,6 @@ memcached_process_unknown(struct memcached_connection *con);
2121int
2222is_expired_tuple (struct memcached_service * p , box_tuple_t * tuple );
2323
24- #define memcached_error_ENOMEM (_bytes , _place , _for ) \
25- box_error_raise(box_error_code_MAX + MEMCACHED_RES_ENOMEM, \
26- "Failed to allocate %u bytes in '%s' for %s", \
27- (_bytes), (_place), (_for))
28-
29- #define memcached_error_KEY_ENOENT () \
30- box_error_raise(box_error_code_MAX + MEMCACHED_RES_KEY_ENOENT, \
31- memcached_binary_res_title[MEMCACHED_RES_KEY_ENOENT])
32-
33- #define memcached_error_KEY_EEXISTS () \
34- box_error_raise(box_error_code_MAX + MEMCACHED_RES_KEY_EEXISTS, \
35- memcached_binary_res_title[MEMCACHED_RES_KEY_EEXISTS])
36-
37- #define memcached_error_E2BIG () \
38- box_error_raise(box_error_code_MAX + MEMCACHED_RES_E2BIG, \
39- memcached_binary_res_title[MEMCACHED_RES_E2BIG])
40-
41- #define memcached_error_EINVAL () \
42- box_error_raise(box_error_code_MAX + MEMCACHED_RES_EINVAL, \
43- memcached_binary_res_title[MEMCACHED_RES_EINVAL])
44-
45- #define memcached_error_NOT_STORED () \
46- box_error_raise(box_error_code_MAX + MEMCACHED_RES_NOT_STORED, \
47- memcached_binary_res_title[MEMCACHED_RES_NOT_STORED])
48-
49- #define memcached_error_DELTA_BADVAL () \
50- box_error_raise(box_error_code_MAX + MEMCACHED_RES_DELTA_BADVAL, \
51- memcached_binary_res_title[MEMCACHED_RES_DELTA_BADVAL])
52-
53- #define memcached_error_AUTH_ERROR () \
54- box_error_raise(box_error_code_MAX + MEMCACHED_RES_AUTH_ERROR, \
55- memcached_binary_res_title[MEMCACHED_RES_AUTH_ERROR])
56-
57- #define memcached_error_AUTH_CONTINUE () \
58- box_error_raise(box_error_code_MAX + MEMCACHED_RES_AUTH_CONTINUE, \
59- memcached_binary_res_title[MEMCACHED_RES_AUTH_CONTINUE])
60-
61- #define memcached_error_UNKNOWN_COMMAND (code ) do { \
62- box_error_raise(box_error_code_MAX + \
63- MEMCACHED_RES_UNKNOWN_COMMAND, \
64- "Unknown command with opcode 0x%.2x", (code)); \
65- say_error("Unknown command with opcode 0x%.2x", (code)); \
66- } while (0)
67-
68- #define memcached_error_NOT_SUPPORTED (op ) do { \
69- box_error_raise(box_error_code_MAX + \
70- MEMCACHED_RES_NOT_SUPPORTED, \
71- "Unsupported command '%s'", (op)); \
72- say_error("Unsupported command '%s'", (op)); \
73- } while (0)
74-
75- #define memcached_error_SERVER_ERROR (fmtstr , ...) do { \
76- box_error_raise(box_error_code_MAX + \
77- MEMCACHED_RES_SERVER_ERROR, \
78- (fmtstr), ##__VA_ARGS__); \
79- say_error((fmtstr), ##__VA_ARGS__); \
80- } while (0)
81-
82-
83-
8424int
8525memcached_bin_process_set (struct memcached_connection * con );
8626int
@@ -106,4 +46,4 @@ memcached_bin_process_quit(struct memcached_connection *con);
10646int
10747memcached_bin_process_stat (struct memcached_connection * con );
10848
109- #endif /* TARANTOOL_BOX_MEMCACHED_LAYER_H_INCLUDED */
49+ #endif /* MEMCACHED_LAYER_H_INCLUDED */
0 commit comments