Unverified Commit 8fc95921 authored by Ozan Tezcan's avatar Ozan Tezcan Committed by GitHub
Browse files

Fix RM_Scan() documentation (#10693)

Fixed RM_Scan() usage example: `RedisModuleCursor` -> `RedisModuleScanCursor` 
parent bdcd4b3d
...@@ -9868,14 +9868,14 @@ void RM_ScanCursorDestroy(RedisModuleScanCursor *cursor) { ...@@ -9868,14 +9868,14 @@ void RM_ScanCursorDestroy(RedisModuleScanCursor *cursor) {
* *
* The way it should be used: * The way it should be used:
* *
* RedisModuleCursor *c = RedisModule_ScanCursorCreate(); * RedisModuleScanCursor *c = RedisModule_ScanCursorCreate();
* while(RedisModule_Scan(ctx, c, callback, privateData)); * while(RedisModule_Scan(ctx, c, callback, privateData));
* RedisModule_ScanCursorDestroy(c); * RedisModule_ScanCursorDestroy(c);
* *
* It is also possible to use this API from another thread while the lock * It is also possible to use this API from another thread while the lock
* is acquired during the actual call to RM_Scan: * is acquired during the actual call to RM_Scan:
* *
* RedisModuleCursor *c = RedisModule_ScanCursorCreate(); * RedisModuleScanCursor *c = RedisModule_ScanCursorCreate();
* RedisModule_ThreadSafeContextLock(ctx); * RedisModule_ThreadSafeContextLock(ctx);
* while(RedisModule_Scan(ctx, c, callback, privateData)){ * while(RedisModule_Scan(ctx, c, callback, privateData)){
* RedisModule_ThreadSafeContextUnlock(ctx); * RedisModule_ThreadSafeContextUnlock(ctx);
...@@ -9963,7 +9963,7 @@ static void moduleScanKeyCallback(void *privdata, const dictEntry *de) { ...@@ -9963,7 +9963,7 @@ static void moduleScanKeyCallback(void *privdata, const dictEntry *de) {
* *
* The way it should be used: * The way it should be used:
* *
* RedisModuleCursor *c = RedisModule_ScanCursorCreate(); * RedisModuleScanCursor *c = RedisModule_ScanCursorCreate();
* RedisModuleKey *key = RedisModule_OpenKey(...) * RedisModuleKey *key = RedisModule_OpenKey(...)
* while(RedisModule_ScanKey(key, c, callback, privateData)); * while(RedisModule_ScanKey(key, c, callback, privateData));
* RedisModule_CloseKey(key); * RedisModule_CloseKey(key);
...@@ -9972,7 +9972,7 @@ static void moduleScanKeyCallback(void *privdata, const dictEntry *de) { ...@@ -9972,7 +9972,7 @@ static void moduleScanKeyCallback(void *privdata, const dictEntry *de) {
* It is also possible to use this API from another thread while the lock is acquired during * It is also possible to use this API from another thread while the lock is acquired during
* the actual call to RM_ScanKey, and re-opening the key each time: * the actual call to RM_ScanKey, and re-opening the key each time:
* *
* RedisModuleCursor *c = RedisModule_ScanCursorCreate(); * RedisModuleScanCursor *c = RedisModule_ScanCursorCreate();
* RedisModule_ThreadSafeContextLock(ctx); * RedisModule_ThreadSafeContextLock(ctx);
* RedisModuleKey *key = RedisModule_OpenKey(...) * RedisModuleKey *key = RedisModule_OpenKey(...)
* while(RedisModule_ScanKey(ctx, c, callback, privateData)){ * while(RedisModule_ScanKey(ctx, c, callback, privateData)){
......
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