From edee864b34b8bd1b08f864aff909af96dfd8bf19 Mon Sep 17 00:00:00 2001 From: 0del <53461381+0del@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:30:30 +0700 Subject: [PATCH] rename redisOp to serverOp (#181) https://github.com/valkey-io/valkey/issues/144 Signed-off-by: 0del --- src/server.c | 8 ++++---- src/server.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/server.c b/src/server.c index 43727a24e..b073de2da 100644 --- a/src/server.c +++ b/src/server.c @@ -3118,7 +3118,7 @@ void resetErrorTableStats(void) { /* ========================== Redis OP Array API ============================ */ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target) { - redisOp *op; + serverOp *op; int prev_capacity = oa->capacity; if (oa->numops == 0) { @@ -3128,7 +3128,7 @@ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int } if (prev_capacity != oa->capacity) - oa->ops = zrealloc(oa->ops,sizeof(redisOp)*oa->capacity); + oa->ops = zrealloc(oa->ops,sizeof(serverOp)*oa->capacity); op = oa->ops+oa->numops; op->dbid = dbid; op->argv = argv; @@ -3141,7 +3141,7 @@ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int void serverOpArrayFree(serverOpArray *oa) { while(oa->numops) { int j; - redisOp *op; + serverOp *op; oa->numops--; op = oa->ops+oa->numops; @@ -3385,7 +3385,7 @@ static void propagatePendingCommands(void) { return; int j; - redisOp *rop; + serverOp *rop; /* If we got here it means we have finished an execution-unit. * If that unit has caused propagation of multiple commands, they diff --git a/src/server.h b/src/server.h index 4226bd99d..730ef2b5b 100644 --- a/src/server.h +++ b/src/server.h @@ -1371,16 +1371,16 @@ typedef struct clientBufferLimitsConfig { extern clientBufferLimitsConfig clientBufferLimitsDefaults[CLIENT_TYPE_OBUF_COUNT]; -/* The redisOp structure defines a Redis Operation, that is an instance of +/* The serverOp structure defines a Redis Operation, that is an instance of * a command with an argument vector, database ID, propagation target * (PROPAGATE_*), and command pointer. * * Currently only used to additionally propagate more commands to AOF/Replication * after the propagation of the executed command. */ -typedef struct redisOp { +typedef struct serverOp { robj **argv; int argc, dbid, target; -} redisOp; +} serverOp; /* Defines an array of Redis operations. There is an API to add to this * structure in an easy way. @@ -1389,7 +1389,7 @@ typedef struct redisOp { * void serverOpArrayFree(serverOpArray *oa); */ typedef struct serverOpArray { - redisOp *ops; + serverOp *ops; int numops; int capacity; } serverOpArray;