-
Notifications
You must be signed in to change notification settings - Fork 130
utils.h: add doxygen doc and move bsl and bsr utils to it
#1916
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
Conversation
d31ec20 to
756d3ca
Compare
utils.h: add doxygen doc and move to it bsl and bsr utils
utils.h: add doxygen doc and move to it bsl and bsr utilsutils.h: add doxygen doc and move bsl and bsr utils to it
src/libAtomVM/utils.h
Outdated
| } | ||
|
|
||
| /** | ||
| * @brief Perform arithmetic right shift on 32-bit signed integer (/c int32_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @brief Perform arithmetic right shift on 32-bit signed integer (/c int32_t) | |
| * @brief Perform arithmetic right shift on 32-bit signed integer (\c int32_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/libAtomVM/utils.h
Outdated
| } | ||
|
|
||
| /** | ||
| * @brief Safely perform arithmetic right shift on 32-bit signed integer (/c int32_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @brief Safely perform arithmetic right shift on 32-bit signed integer (/c int32_t) | |
| * @brief Safely perform arithmetic right shift on 32-bit signed integer (\c int32_t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
These functions are general purpose helpers to avoid undefined behaviours, so they can be used also outside of bif.c. Signed-off-by: Davide Bettio <[email protected]>
Add doxygen documentation for functions such as int64_is_negative, etc... Signed-off-by: Davide Bettio <[email protected]>
Keep variants (int32,int64) of the same function close together. Signed-off-by: Davide Bettio <[email protected]>
Since avm_int_t is widely used around, such as for the shift parameter in bsr and bsl, it is a safer option accepting size_t: a positive avm_int_t can always be converted to size_t. Also, make this assumption clear in term_typedef.h. Signed-off-by: Davide Bettio <[email protected]>
756d3ca to
b0db34a
Compare
utils.hfunctions that have been introduced with feature/bigint branch.utils.h.boperand ina bsr banda bsl bThese changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later