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

Fix ISO C naming violations of function names and header guards #21

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Jun 21, 2024

  • Update header guards after move of files
  • Fix ISO-C naming violation by renaming internal functions:
    • ..SetError()
    • _valkeyClusterConnect()
    • __valkeyClusterAppendCommand()
    • __valkeyClusterGetReplyFromNode()
  • Remove internal func __valkeyClusterGetReply()
  • Remove internal func _valkeyClusterConnect2()

Closes #19

@@ -1,5 +1,5 @@
#ifndef __TEST_UTILS_H__
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why add VALKEY to each of these? Do you think there's a risk of macro name collission?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably no collision in src/, I mostly followed how its done in the non-cluster headers.

src/async_private.h: #ifndef VALKEY_ASYNC_PRIVATE_H
src/fmacros.h:       #ifndef VALKEY_FMACRO_H

One (only?) benefit I can think of is that its already correct if we need to make a header public.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@bjosv bjosv merged commit a5b7e1d into valkey-io:main Jul 1, 2024
41 of 43 checks passed
@bjosv bjosv deleted the iso branch July 1, 2024 11:22
michael-grunder pushed a commit to michael-grunder/libvalkey that referenced this pull request Aug 1, 2024
…ey-io#21)

* Update header guards after move of header files
* Fix ISO-C naming violation by renaming internal functions:
  * ..SetError()
  *  _valkeyClusterConnect()
  * __valkeyClusterAppendCommand()
  * __valkeyClusterGetReplyFromNode()
* Remove internal func __valkeyClusterGetReply()
* Remove internal func _valkeyClusterConnect2()

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
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.

ISO C naming of functions and header guards
2 participants