| 265 | } |
| 266 | |
| 267 | static int __redisShiftCallback(redisCallbackList *list, redisCallback *target) { |
| 268 | redisCallback *cb = list->head; |
| 269 | if (cb != NULL) { |
| 270 | list->head = cb->next; |
| 271 | if (cb == list->tail) |
| 272 | list->tail = NULL; |
| 273 | |
| 274 | /* Copy callback from heap to stack */ |
| 275 | if (target != NULL) |
| 276 | memcpy(target,cb,sizeof(*cb)); |
| 277 | hi_free(cb); |
| 278 | return REDIS_OK; |
| 279 | } |
| 280 | return REDIS_ERR; |
| 281 | } |
| 282 | |
| 283 | static void __redisRunCallback(redisAsyncContext *ac, redisCallback *cb, redisReply *reply) { |
| 284 | redisContext *c = &(ac->c); |
no test coverage detected