Rename methods and members containing the reserved C++ delete keyword to destroy
This is likely an API-breaking change
- Closes #84
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.
In case there are security findings, they will be communicated to you as a comment inside the PR.
Hope you’ll enjoy using Jit.
Questions? Comments? Want to learn more? Get in touch with us.
Hi @sjperkins, Thanks for the PR! I'd suggest
- Using
destroyinstead ofclosefor better semantic accuracy. This callback doesn't just close a handle it destroys the entire context (Closes file/socket handles, Frees memory, Complete cleanup with the option to reopen/reuse). - Maybe accordingly rename
respFileWriteDeletetorespFileWriteDestroyandredisLoaderDeletetoredisLoaderDestroy. - Since this breaks the API, we need to bump the major version per semver. Bump
src/version.hto 2.0.0. - We also need to add basic CHANGELOG.md. Something like:
## [2.0.0] - 2025-11-10
### Breaking Changes
- **RdbxRespWriter**: Renamed `delete` member to `destroy` for C++ compatibility
- `delete` is a reserved keyword in C++
- `destroy` more accurately describes the operation (cleanup + memory deallocation)
- I also noticed that on version upgrade "make clean" won't del old generated libs. We probably need to refine
src/lib/makefileandsrc/ext/makefilewith:
@rm -rvf $(LIB_DIR)/lib$(LIB_NAME).so.* $(TARGET_LIB_STATIC) ./*.o ./*.d;
LMK, if you prefer i will do it. thanks.
Hi @moticless. Apologies for the delayed response.
I believe I've addressed your comments. I'd appreciate a review of the changes.