X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Freturn.h;h=0d3148429f46be9ad901f28c104c9ff4b6688d10;hb=a5f039742fa3d25829d788edff0e84bdc41401f7;hp=1d605544af94b70d8b080cfb3f5838e68a12d1f0;hpb=b16fffff43d822239ce79a366ec36873b0803df9;p=m6w6%2Flibmemcached diff --git a/libmemcached/return.h b/libmemcached/return.h index 1d605544..0d314842 100644 --- a/libmemcached/return.h +++ b/libmemcached/return.h @@ -39,16 +39,16 @@ enum memcached_return_t { MEMCACHED_SUCCESS, MEMCACHED_FAILURE, - MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() only - MEMCACHED_CONNECTION_FAILURE, // DEPRECATED - MEMCACHED_CONNECTION_BIND_FAILURE, // DEPRECATED + MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() and getnameinfo() only + MEMCACHED_CONNECTION_FAILURE, + MEMCACHED_CONNECTION_BIND_FAILURE, // DEPRECATED, see MEMCACHED_HOST_LOOKUP_FAILURE MEMCACHED_WRITE_FAILURE, MEMCACHED_READ_FAILURE, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_PROTOCOL_ERROR, MEMCACHED_CLIENT_ERROR, MEMCACHED_SERVER_ERROR, - MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, + MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE, // DEPRECATED MEMCACHED_DATA_EXISTS, MEMCACHED_DATA_DOES_NOT_EXIST, MEMCACHED_NOTSTORED, @@ -64,7 +64,7 @@ enum memcached_return_t { MEMCACHED_STAT, MEMCACHED_ITEM, MEMCACHED_ERRNO, - MEMCACHED_FAIL_UNIX_SOCKET, + MEMCACHED_FAIL_UNIX_SOCKET, // DEPRECATED MEMCACHED_NOT_SUPPORTED, MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */ MEMCACHED_FETCH_NOTFINISHED, @@ -83,6 +83,7 @@ enum memcached_return_t { MEMCACHED_PARSE_ERROR, MEMCACHED_PARSE_USER_ERROR, MEMCACHED_DEPRECATED, + MEMCACHED_IN_PROGRESS, MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ }; @@ -91,6 +92,7 @@ typedef enum memcached_return_t memcached_return_t; #endif -#define memcached_success(X) (X) == MEMCACHED_SUCCESS ? true : false -#define memcached_failed(A) (A) != MEMCACHED_SUCCESS ? true : false +#define memcached_success(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_SUCCESS or (__memcached_return_t) == MEMCACHED_END) +#define memcached_failed(__memcached_return_t) ((__memcached_return_t) != MEMCACHED_SUCCESS and (__memcached_return_t) != MEMCACHED_END) +#define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)