Minor cleanup
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 319
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
After reading some part of the library, I noticed some minor change with ABI break.
unverified_safe_becauseistemplate<size_t N>but N is never used.
Another declaration could be:
inline auto unverified_safe_because(const char *reason)
const->static constexpr
The library is explicitly c++17. There is lots of const int CompileErrorCode = 42; that could be replaced by static constexpr int CompileErrorCode = 42;
- in
#define helper_create_converted_field,isFrozenis unused
So new declaration could be:
#define helper_create_converted_field(fieldType, fieldName)
- Finally a question: the library is explicitly not thread-safe.
So why there is a std::mutex callback_lock, RLBOX_SHARED_LOCK, RLBOX_ACQUIRE_SHARED_GUARD and RLBOX_ACQUIRE_UNIQUE_GUARD? Is this a try to make a thread-safe library?
Thanks,
PS: If you're fine with these changes, I can implement them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating unverified_safe_because, the CompileErrorCode declarations, helper_create_converted_field, and the callback locking macros. Determine whether removing unused parameters or changing declarations preserves the ABI, then resolve the question of why the mutex and shared or unique guards exist. Done means the cleanup scope and thread-safety behavior are explicitly decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100