Skip to content

Commit

Permalink
Post merge fixes to PR #2 (and site update)
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 10, 2024
1 parent e6a55f6 commit 0efcbe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`.

Expand Down
5 changes: 4 additions & 1 deletion src/resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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);
Expand Down

0 comments on commit 0efcbe5

Please sign in to comment.