Initialize the consumer interface type with the requested type. */
| 2991 | |
| 2992 | /* Initialize the consumer interface type with the requested type. */ |
| 2993 | static void zrangeResultHandlerInit(zrange_result_handler *handler, |
| 2994 | client *client, zrange_consumer_type type) |
| 2995 | { |
| 2996 | memset(handler, 0, sizeof(*handler)); |
| 2997 | |
| 2998 | handler->client = client; |
| 2999 | |
| 3000 | switch (type) { |
| 3001 | case ZRANGE_CONSUMER_TYPE_CLIENT: |
| 3002 | handler->beginResultEmission = zrangeResultBeginClient; |
| 3003 | handler->finalizeResultEmission = zrangeResultFinalizeClient; |
| 3004 | handler->emitResultFromCBuffer = zrangeResultEmitCBufferToClient; |
| 3005 | handler->emitResultFromLongLong = zrangeResultEmitLongLongToClient; |
| 3006 | break; |
| 3007 | |
| 3008 | case ZRANGE_CONSUMER_TYPE_INTERNAL: |
| 3009 | handler->beginResultEmission = zrangeResultBeginStore; |
| 3010 | handler->finalizeResultEmission = zrangeResultFinalizeStore; |
| 3011 | handler->emitResultFromCBuffer = zrangeResultEmitCBufferForStore; |
| 3012 | handler->emitResultFromLongLong = zrangeResultEmitLongLongForStore; |
| 3013 | break; |
| 3014 | } |
| 3015 | } |
| 3016 | |
| 3017 | static void zrangeResultHandlerScoreEmissionEnable(zrange_result_handler *handler) { |
| 3018 | handler->withscores = 1; |
no outgoing calls
no test coverage detected