Unverified Commit 5360350e authored by Kaige Ye's avatar Kaige Ye Committed by GitHub
Browse files

cleanup NBSP characters in comments (#10555)

Replace NBSP character (0xC2 0xA0) with space (0x20).

Looks like that was originally added due to misconfigured editor which seems to have been fixed by now.
parent 9344f654
...@@ -2576,30 +2576,30 @@ RedisModuleString* RM_HoldString(RedisModuleCtx *ctx, RedisModuleString *str) { ...@@ -2576,30 +2576,30 @@ RedisModuleString* RM_HoldString(RedisModuleCtx *ctx, RedisModuleString *str) {
if (ctx != NULL) { if (ctx != NULL) {
/* /*
* Put the str in the auto memory management of the ctx. * Put the str in the auto memory management of the ctx.
         * It might already be there, in this case, the ref count will * It might already be there, in this case, the ref count will
         * be 2 and we will decrease the ref count twice and free the * be 2 and we will decrease the ref count twice and free the
         * object in the auto memory free function. * object in the auto memory free function.
         * *
         * Why we can not do the same trick of just remove the object * Why we can not do the same trick of just remove the object
         * from the auto memory (like in RM_RetainString)? * from the auto memory (like in RM_RetainString)?
         * This code shows the issue: * This code shows the issue:
         * *
         * RM_AutoMemory(ctx); * RM_AutoMemory(ctx);
         * str1 = RM_CreateString(ctx, "test", 4); * str1 = RM_CreateString(ctx, "test", 4);
         * str2 = RM_HoldString(ctx, str1); * str2 = RM_HoldString(ctx, str1);
         * RM_FreeString(str1); * RM_FreeString(str1);
         * RM_FreeString(str2); * RM_FreeString(str2);
         * *
         * If after the RM_HoldString we would just remove the string from * If after the RM_HoldString we would just remove the string from
         * the auto memory, this example will cause access to a freed memory * the auto memory, this example will cause access to a freed memory
         * on 'RM_FreeString(str2);' because the String will be free * on 'RM_FreeString(str2);' because the String will be free
         * on 'RM_FreeString(str1);'. * on 'RM_FreeString(str1);'.
         * *
         * So it's safer to just increase the ref count * So it's safer to just increase the ref count
         * and add the String to auto memory again. * and add the String to auto memory again.
         * *
         * The limitation is that it is not possible to use RedisModule_StringAppendBuffer * The limitation is that it is not possible to use RedisModule_StringAppendBuffer
         * on the String. * on the String.
*/ */
autoMemoryAdd(ctx,REDISMODULE_AM_STRING,str); autoMemoryAdd(ctx,REDISMODULE_AM_STRING,str);
} }
......
...@@ -575,8 +575,8 @@ void addReplyErrorObject(client *c, robj *err) { ...@@ -575,8 +575,8 @@ void addReplyErrorObject(client *c, robj *err) {
} }
/* Sends either a reply or an error reply by checking the first char. /* Sends either a reply or an error reply by checking the first char.
 * If the first char is '-' the reply is considered an error. * If the first char is '-' the reply is considered an error.
 * In any case the given reply is sent, if the reply is also recognize * In any case the given reply is sent, if the reply is also recognize
* as an error we also perform some post reply operations such as * as an error we also perform some post reply operations such as
* logging and stats update. */ * logging and stats update. */
void addReplyOrErrorObject(client *c, robj *reply) { void addReplyOrErrorObject(client *c, robj *reply) {
......
...@@ -1764,16 +1764,16 @@ void replicationCreateMasterClient(connection *conn, int dbid) { ...@@ -1764,16 +1764,16 @@ void replicationCreateMasterClient(connection *conn, int dbid) {
connSetReadHandler(server.master->conn, readQueryFromClient); connSetReadHandler(server.master->conn, readQueryFromClient);
/** /**
     * Important note: * Important note:
     * The CLIENT_DENY_BLOCKING flag is not, and should not, be set here. * The CLIENT_DENY_BLOCKING flag is not, and should not, be set here.
     * For commands like BLPOP, it makes no sense to block the master * For commands like BLPOP, it makes no sense to block the master
     * connection, and such blocking attempt will probably cause deadlock and * connection, and such blocking attempt will probably cause deadlock and
     * break the replication. We consider such a thing as a bug because * break the replication. We consider such a thing as a bug because
    * commands as BLPOP should never be sent on the replication link. * commands as BLPOP should never be sent on the replication link.
     * A possible use-case for blocking the replication link is if a module wants * A possible use-case for blocking the replication link is if a module wants
     * to pass the execution to a background thread and unblock after the * to pass the execution to a background thread and unblock after the
     * execution is done. This is the reason why we allow blocking the replication * execution is done. This is the reason why we allow blocking the replication
     * connection. */ * connection. */
server.master->flags |= CLIENT_MASTER; server.master->flags |= CLIENT_MASTER;
server.master->authenticated = 1; server.master->authenticated = 1;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* callback represents a different reply type. Each callback gets a p_ctx that * callback represents a different reply type. Each callback gets a p_ctx that
* was given to the parseReply function. The callbacks also give the protocol * was given to the parseReply function. The callbacks also give the protocol
* (underlying blob) of the current reply and the size. * (underlying blob) of the current reply and the size.
 * *
* Some callbacks also get the parser object itself: * Some callbacks also get the parser object itself:
* - array_callback * - array_callback
* - set_callback * - set_callback
......
...@@ -1562,8 +1562,8 @@ static void luaMaskCountHook(lua_State *lua, lua_Debug *ar) { ...@@ -1562,8 +1562,8 @@ static void luaMaskCountHook(lua_State *lua, lua_Debug *ar) {
/* /*
* Set the hook to invoke all the time so the user * Set the hook to invoke all the time so the user
         * will not be able to catch the error with pcall and invoke * will not be able to catch the error with pcall and invoke
         * pcall again which will prevent the script from ever been killed * pcall again which will prevent the script from ever been killed
*/ */
lua_sethook(lua, luaMaskCountHook, LUA_MASKLINE, 0); lua_sethook(lua, luaMaskCountHook, LUA_MASKLINE, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment