diff --git a/README.md b/README.md index 06a16f3..49de960 100644 --- a/README.md +++ b/README.md @@ -458,9 +458,8 @@ while for `RESP_ARRAY` types the `value` is a pointer to an embedded `RESP` arra in that. To help with deciding what cast to use for a given `value` field of the RESP data structure, we provide the -convenience methods `redisxIsScalarType()` when cast is `(void)` or else `(double *)`), `redisxIsArrayType()` if the -cast is `(RESP **)`, `redisxIsStringTupe()` if the cast should be `(char *)`, and `redisxIsMapType()` if the cast -should be to `(RedisMapEntry *)`. +convenience methods `redisxIsScalarType()`, `redisxIsStringType()`, `redisxIsArrayType()`, and `redisxIsMapType()` +functions. You can check that two `RESP` data structures are equivalent with `redisxIsEqualRESP(RESP *a, RESP *b)`. diff --git a/src/resp.c b/src/resp.c index 9780b07..d147b81 100644 --- a/src/resp.c +++ b/src/resp.c @@ -739,6 +739,7 @@ XField *redisxRESP2XField(const char *name, const RESP *resp) { * set to indicate the type of error). * * @sa resp2XField() + * @sa redisxPrintRESP() */ char *redisxRESP2JSON(const char *name, const RESP *resp) { return xjsonFieldToString(redisxRESP2XField(name, resp)); @@ -750,9 +751,11 @@ char *redisxRESP2JSON(const char *name, const RESP *resp) { * @param name The name/ID to assign to the RESP * @param resp The RESP data to print * @return 0 + * + * @sa redisxRESP2JSON() */ int redisxPrintRESP(const char *name, const RESP *resp) { - char *json = redisxRESP2JSON("hello_response", resp); + char *json = redisxRESP2JSON(name, resp); if(json) { printf("%s", json);