fix loop in Redis engine translation unit
@@ -106,9 +106,7 @@ static inline void redis_free(redis_engine_s *r) {
Simple RESP formatting
***************************************************************************** */
-inline static void fiobj2resp2(FIOBJ dest, FIOBJ obj) {
- if (fiobj_hash_key_in_loop())
- fiobj2resp2(dest, fiobj_hash_key_in_loop());
+inline static void fiobj2resp2___internal(FIOBJ dest, FIOBJ obj) {
fio_str_info_s s;
switch (FIOBJ_TYPE(obj)) {
case FIOBJ_T_NULL:
@@ -154,6 +152,12 @@ inline static void fiobj2resp2(FIOBJ dest, FIOBJ obj) {
}
}
+inline static void fiobj2resp2(FIOBJ dest, FIOBJ obj) {
+ if (fiobj_hash_key_in_loop())
+ fiobj2resp2___internal(dest, fiobj_hash_key_in_loop());
+ fiobj2resp2___internal(dest, obj);
+}
+
static int fiobj2resp_task(FIOBJ o, void *dest_) {
fiobj2resp2((FIOBJ)dest_, o);
return 0;
