Fix RM_Scan() documentation (#10693)

Fixed RM_Scan() usage example: `RedisModuleCursor` -> `RedisModuleScanCursor`
This commit is contained in:
Ozan Tezcan 2022-05-09 12:38:45 +03:00 committed by GitHub
parent bdcd4b3df8
commit 8fc959216c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {
* *
* 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) {
* 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)){