mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-21 23:58:51 -05:00
tests/support: s/redis/redict/g
Signed-off-by: Drew DeVault <sir@cmpwn.com>
This commit is contained in:
parent
e23dcf403b
commit
a609e26c56
@ -368,7 +368,7 @@ proc ::redict::redict_reset_state id {
|
||||
set ::redict::statestack($id) {}
|
||||
}
|
||||
|
||||
proc ::redict::redis.call_callback {id type reply} {
|
||||
proc ::redict::redict.call_callback {id type reply} {
|
||||
set cb [lindex $::redict::callback($id) 0]
|
||||
set ::redict::callback($id) [lrange $::redict::callback($id) 1 end]
|
||||
uplevel #0 $cb [list ::redict::redictHandle$id $type $reply]
|
||||
@ -378,7 +378,7 @@ proc ::redict::redis.call_callback {id type reply} {
|
||||
# Read a reply in non-blocking mode.
|
||||
proc ::redict::redict_readable {fd id} {
|
||||
if {[eof $fd]} {
|
||||
redis.call_callback $id eof {}
|
||||
redict.call_callback $id eof {}
|
||||
::redict::__method__close $id $fd
|
||||
return
|
||||
}
|
||||
@ -387,9 +387,9 @@ proc ::redict::redict_readable {fd id} {
|
||||
if {$line eq {}} return ;# No complete line available, return
|
||||
switch -exact -- [string index $line 0] {
|
||||
: -
|
||||
+ {redis.call_callback $id reply [string range $line 1 end-1]}
|
||||
- {redis.call_callback $id err [string range $line 1 end-1]}
|
||||
( {redis.call_callback $id reply [string range $line 1 end-1]}
|
||||
+ {redict.call_callback $id reply [string range $line 1 end-1]}
|
||||
- {redict.call_callback $id err [string range $line 1 end-1]}
|
||||
( {redict.call_callback $id reply [string range $line 1 end-1]}
|
||||
$ {
|
||||
dict set ::redict::state($id) bulk \
|
||||
[expr [string range $line 1 end-1]+2]
|
||||
@ -404,11 +404,11 @@ proc ::redict::redict_readable {fd id} {
|
||||
dict set ::redict::state($id) mbulk [string range $line 1 end-1]
|
||||
# Handle *-1
|
||||
if {[dict get $::redict::state($id) mbulk] == -1} {
|
||||
redis.call_callback $id reply {}
|
||||
redict.call_callback $id reply {}
|
||||
}
|
||||
}
|
||||
default {
|
||||
redis.call_callback $id err \
|
||||
redict.call_callback $id err \
|
||||
"Bad protocol, $type as reply type byte"
|
||||
}
|
||||
}
|
||||
@ -423,7 +423,7 @@ proc ::redict::redict_readable {fd id} {
|
||||
if {[string length [dict get $::redict::state($id) buf]] ==
|
||||
[dict get $::redict::state($id) bulk]} {
|
||||
if {[dict get $::redict::state($id) mbulk] == -1} {
|
||||
redis.call_callback $id reply \
|
||||
redict.call_callback $id reply \
|
||||
[string range [dict get $::redict::state($id) buf] 0 end-2]
|
||||
} else {
|
||||
dict with ::redict::state($id) {
|
||||
@ -432,7 +432,7 @@ proc ::redict::redict_readable {fd id} {
|
||||
set bulk -1
|
||||
}
|
||||
if {[dict get $::redict::state($id) mbulk] == 0} {
|
||||
redis.call_callback $id reply \
|
||||
redict.call_callback $id reply \
|
||||
[dict get $::redict::state($id) reply]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user