Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9438022

Browse files
committed
cleanup TSRMLS_* usage
1 parent 28388ab commit 9438022

16 files changed

Lines changed: 942 additions & 942 deletions

cluster_library.c

Lines changed: 102 additions & 102 deletions
Large diffs are not rendered by default.

cluster_library.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262

6363
/* Protected sending of data down the wire to a RedisSock->stream */
6464
#define CLUSTER_SEND_PAYLOAD(sock, buf, len) \
65-
(sock && !cluster_sock_open(sock TSRMLS_CC) && sock->stream && !redis_check_eof(sock, 1 TSRMLS_CC) && \
65+
(sock && !cluster_sock_open(sock) && sock->stream && !redis_check_eof(sock, 1 ) && \
6666
php_stream_write(sock->stream, buf, len)==len)
6767

6868
/* Macro to read our reply type character */
6969
#define CLUSTER_VALIDATE_REPLY_TYPE(sock, type) \
70-
(redis_check_eof(sock, 1 TSRMLS_CC) == 0 && \
70+
(redis_check_eof(sock, 1) == 0 && \
7171
(php_stream_getc(sock->stream) == type))
7272

7373
/* Reset our last single line reply buffer and length */
@@ -141,7 +141,7 @@ typedef enum CLUSTER_REDIR_TYPE {
141141
} CLUSTER_REDIR_TYPE;
142142

143143
/* MULTI BULK response callback typedef */
144-
typedef int (*mbulk_cb)(RedisSock*,zval*,long long, void* TSRMLS_DC);
144+
typedef int (*mbulk_cb)(RedisSock*,zval*,long long, void*);
145145

146146
/* A list of covered slot ranges */
147147
typedef struct redisSlotRange {
@@ -340,9 +340,9 @@ typedef struct clusterReply {
340340
} clusterReply;
341341

342342
/* Direct variant response handler */
343-
clusterReply *cluster_read_resp(redisCluster *c, int status_strings TSRMLS_DC);
343+
clusterReply *cluster_read_resp(redisCluster *c, int status_strings);
344344
clusterReply *cluster_read_sock_resp(RedisSock *redis_sock,
345-
REDIS_REPLY_TYPE type, char *line_reply, size_t reply_len TSRMLS_DC);
345+
REDIS_REPLY_TYPE type, char *line_reply, size_t reply_len);
346346
void cluster_free_reply(clusterReply *reply, int free_data);
347347

348348
/* Cluster distribution helpers for WATCH */
@@ -351,7 +351,7 @@ void cluster_dist_free(HashTable *ht);
351351
int cluster_dist_add_key(redisCluster *c, HashTable *ht, char *key,
352352
size_t key_len, clusterKeyVal **kv);
353353
void cluster_dist_add_val(redisCluster *c, clusterKeyVal *kv, zval *val
354-
TSRMLS_DC);
354+
);
355355

356356
/* Aggregation for multi commands like MGET, MSET, and MSETNX */
357357
void cluster_multi_init(clusterMultiCmd *mc, char *kw, int kw_len);
@@ -367,25 +367,25 @@ unsigned short cluster_hash_key(const char *key, int len);
367367
long long mstime(void);
368368

369369
PHP_REDIS_API short cluster_send_command(redisCluster *c, short slot, const char *cmd,
370-
int cmd_len TSRMLS_DC);
370+
int cmd_len);
371371

372-
PHP_REDIS_API void cluster_disconnect(redisCluster *c, int force TSRMLS_DC);
372+
PHP_REDIS_API void cluster_disconnect(redisCluster *c, int force);
373373

374-
PHP_REDIS_API int cluster_send_exec(redisCluster *c, short slot TSRMLS_DC);
375-
PHP_REDIS_API int cluster_send_discard(redisCluster *c, short slot TSRMLS_DC);
376-
PHP_REDIS_API int cluster_abort_exec(redisCluster *c TSRMLS_DC);
374+
PHP_REDIS_API int cluster_send_exec(redisCluster *c, short slot);
375+
PHP_REDIS_API int cluster_send_discard(redisCluster *c, short slot);
376+
PHP_REDIS_API int cluster_abort_exec(redisCluster *c);
377377
PHP_REDIS_API int cluster_reset_multi(redisCluster *c);
378378

379379
PHP_REDIS_API short cluster_find_slot(redisCluster *c, const char *host,
380380
unsigned short port);
381381
PHP_REDIS_API int cluster_send_slot(redisCluster *c, short slot, char *cmd,
382-
int cmd_len, REDIS_REPLY_TYPE rtype TSRMLS_DC);
382+
int cmd_len, REDIS_REPLY_TYPE rtype);
383383

384384
PHP_REDIS_API redisCluster *cluster_create(double timeout, double read_timeout,
385385
int failover, int persistent);
386-
PHP_REDIS_API void cluster_free(redisCluster *c, int free_ctx TSRMLS_DC);
386+
PHP_REDIS_API void cluster_free(redisCluster *c, int free_ctx);
387387
PHP_REDIS_API int cluster_init_seeds(redisCluster *c, HashTable *ht_seeds);
388-
PHP_REDIS_API int cluster_map_keyspace(redisCluster *c TSRMLS_DC);
388+
PHP_REDIS_API int cluster_map_keyspace(redisCluster *c);
389389
PHP_REDIS_API void cluster_free_node(redisClusterNode *node);
390390

391391
/* Functions for interacting with cached slots maps */
@@ -396,7 +396,7 @@ PHP_REDIS_API void cluster_init_cache(redisCluster *c, redisCachedCluster *rcc);
396396
/* Functions to facilitate cluster slot caching */
397397

398398
PHP_REDIS_API char **cluster_sock_read_multibulk_reply(RedisSock *redis_sock,
399-
int *len TSRMLS_DC);
399+
int *len);
400400

401401
/*
402402
* Redis Cluster response handlers. Our response handlers generally take the
@@ -492,15 +492,15 @@ PHP_REDIS_API void cluster_xinfo_resp(INTERNAL_FUNCTION_PARAMETERS,
492492

493493
/* MULTI BULK processing callbacks */
494494
int mbulk_resp_loop(RedisSock *redis_sock, zval *z_result,
495-
long long count, void *ctx TSRMLS_DC);
495+
long long count, void *ctx);
496496
int mbulk_resp_loop_raw(RedisSock *redis_sock, zval *z_result,
497-
long long count, void *ctx TSRMLS_DC);
497+
long long count, void *ctx);
498498
int mbulk_resp_loop_zipstr(RedisSock *redis_sock, zval *z_result,
499-
long long count, void *ctx TSRMLS_DC);
499+
long long count, void *ctx);
500500
int mbulk_resp_loop_zipdbl(RedisSock *redis_sock, zval *z_result,
501-
long long count, void *ctx TSRMLS_DC);
501+
long long count, void *ctx);
502502
int mbulk_resp_loop_assoc(RedisSock *redis_sock, zval *z_result,
503-
long long count, void *ctx TSRMLS_DC);
503+
long long count, void *ctx);
504504

505505
#endif
506506

common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ typedef enum {
127127
} while (0)
128128

129129
#define SOCKET_WRITE_COMMAND(redis_sock, cmd, cmd_len) \
130-
if(redis_sock_write(redis_sock, cmd, cmd_len TSRMLS_CC) < 0) { \
130+
if(redis_sock_write(redis_sock, cmd, cmd_len) < 0) { \
131131
efree(cmd); \
132132
RETURN_FALSE; \
133133
}
@@ -156,7 +156,7 @@ typedef enum {
156156

157157
#define REDIS_PROCESS_RESPONSE_CLOSURE(function, closure_context) \
158158
if (!IS_PIPELINE(redis_sock)) { \
159-
if (redis_response_enqueued(redis_sock TSRMLS_CC) != SUCCESS) { \
159+
if (redis_response_enqueued(redis_sock) != SUCCESS) { \
160160
RETURN_FALSE; \
161161
} \
162162
} \
@@ -177,7 +177,7 @@ typedef enum {
177177
* function is redis_<cmdname>_cmd */
178178
#define REDIS_PROCESS_CMD(cmdname, resp_func) \
179179
RedisSock *redis_sock; char *cmd; int cmd_len; void *ctx=NULL; \
180-
if ((redis_sock = redis_sock_get(getThis() TSRMLS_CC, 0)) == NULL || \
180+
if ((redis_sock = redis_sock_get(getThis(), 0)) == NULL || \
181181
redis_##cmdname##_cmd(INTERNAL_FUNCTION_PARAM_PASSTHRU,redis_sock, \
182182
&cmd, &cmd_len, NULL, &ctx)==FAILURE) { \
183183
RETURN_FALSE; \
@@ -193,7 +193,7 @@ typedef enum {
193193
* and keyword which is passed to us*/
194194
#define REDIS_PROCESS_KW_CMD(kw, cmdfunc, resp_func) \
195195
RedisSock *redis_sock; char *cmd; int cmd_len; void *ctx=NULL; \
196-
if ((redis_sock = redis_sock_get(getThis() TSRMLS_CC, 0)) == NULL || \
196+
if ((redis_sock = redis_sock_get(getThis(), 0)) == NULL || \
197197
cmdfunc(INTERNAL_FUNCTION_PARAM_PASSTHRU, redis_sock, kw, &cmd, \
198198
&cmd_len, NULL, &ctx)==FAILURE) { \
199199
RETURN_FALSE; \

0 commit comments

Comments
 (0)