Skip to content

Rename freeReplyObject to valkeyFreeReplyObject#297

Open
bjosv wants to merge 3 commits into
valkey-io:mainfrom
bjosv:rename-freeReplyObject
Open

Rename freeReplyObject to valkeyFreeReplyObject#297
bjosv wants to merge 3 commits into
valkey-io:mainfrom
bjosv:rename-freeReplyObject

Conversation

@bjosv

@bjosv bjosv commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

The old name was inherited from hiredis and conflicts when both libraries are linked into the same binary.
Rename to follow the valkey prefix convention used by the rest of the API.

This is a breaking API change.

Fixes #288

bjosv added 2 commits March 23, 2026 12:18
The old name was inherited from hiredis and conflicts when both
libraries are linked into the same binary. Rename to follow the
valkey prefix convention used by the rest of the API.

This is a breaking API change.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is used by all users so it has a large blast radius, right? Annoying for those who already migrated.

Can we add a define for compatibility?

#define freeReplyObject valkeyFreeReplyObject

You'd only get it if you include valkey.h so it doesn't conflict for other parts of the system. Maybe also guard it with some ifdef. WDYT?

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@michael-grunder

Copy link
Copy Markdown
Collaborator

IMO it's probably worth making this the default behavior when we release v1.0.0.

Comment thread README.md
Comment on lines +67 to +69
### Other build options

`VALKEY_NO_DEPRECATED` — Disable deprecated names (e.g. `freeReplyObject`). Define this to ensure only the new `valkey`-prefixed names are used.

@zuiderkwast zuiderkwast May 5, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a make variable like the other build options mentioned above. Can we worth mentioning. How do you specify defines on the command line? Like this?

make `CFLAGS=-DVALKEY_NO_DEPRECATED=1`

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we mention this rename in the migration guide?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternative name for freeReplyObject.

3 participants