-
Notifications
You must be signed in to change notification settings - Fork 15
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
Big refactoring #2
base: master
Are you sure you want to change the base?
Conversation
thanks for your interest in this project.
you seem to have solved this by having two distinct headers, but this defeats the purpose of having a single-file header...
i guess nothing speaks against that, given that you make proper use of the end_ prefix.
personal style preference - i don't think we want to argue about this topic.
this might add a little benefit at least, if it doesn't gratuitously make the code uglier.
thanks, this is a valuable contribution. |
8c683ab
to
28ba03c
Compare
Network to host and host to network functions are tested now.
75ed552
to
cda5fbc
Compare
* All API functions have been moved to the top of endianness.h. * Postfix "_impl" has been added to the non public functions. * Added missing POSIX end_htons, end_htonl, end_ntohl, end_ntohs functions. * Macros have been reorder for readability. * Consistent tabs instead of spaces. * Enforced 80 characters line length limit.
cda5fbc
to
92b46ec
Compare
DONE - I've moved API macros to the top of the header and removed the implementation header. Now the user clearly sees the API after opening the file for the first time.
DONE - Fixed the commit message. Macros in the code already had a proper prefix.
DONE - Consistent tabs in all of the code base.
DONE - There is only one place where this really changed anything, and I don't think it changes anything from the readability perspective (see endianness.h:169). |
so the additional _impl redirection layer is no longer actually needed, right ?
i'd pretty much prefer no whitespace changes at all |
Split code to API and implementation headers
Extend tests with conversion functions
Refactor endianness.h