Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix some API functions and types correctly #180

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Aug 22, 2023

Rename node iterator type and its functions:
nodeIterator to redisClusterNodeIterator
initNodeIterator(..) to redisClusterInitNodeIterator(..)
nodeNext(..) to redisClusterNodeNext(..)

Renaming of:
cluster_update_route to redisClusterUpdateSlotMap()

Old names are still defined for backward compability,
but HIRCLUSTER_NO_OLD_NAMES can be defined when backward compability with old types or function names is not needed.

@bjosv bjosv requested a review from zuiderkwast August 22, 2023 13:09
hircluster.h Outdated Show resolved Hide resolved
hircluster.h Outdated Show resolved Hide resolved
hircluster.c Outdated Show resolved Hide resolved
@bjosv bjosv force-pushed the api-fixes branch 3 times, most recently from ff8f1ef to 9133f86 Compare August 24, 2023 09:50
Comment on lines +492 to +493
First it needs to be initiated using `redisClusterInitNodeIterator()` and then you can repeatedly
call `redisClusterNodeNext()` to get the next node from the iterator.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add the prototypes (or an example) here so the users don't need to look in the header file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good, I added the prototype as it is done for most other commands.

nodeIterator         -> redisClusterNodeIterator
initNodeIterator(..) -> redisClusterInitNodeIterator(..)
nodeNext(..)         -> redisClusterNodeNext(..)

HIRCLUSTER_NO_OLD_NAMES can be defined when backward compability
with old types or function names is not needed.
@bjosv bjosv merged commit 26b1e77 into Nordix:master Aug 24, 2023
32 checks passed
@bjosv bjosv deleted the api-fixes branch August 24, 2023 15:54
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.

2 participants