Skip to content

Conversation

@BikingGlobetrotter
Copy link
Contributor

Hi, I am Michael and I am using wrenbind17 (thanks for providing it).
This is my first contribution to make it an even better library (others may follow ;-) ):

I noticed that std::realloc is called inside reallocateFn even if the size is 0.
According to C++ standard ( https://en.cppreference.com/w/cpp/memory/c/realloc ),
the behavior in that case in implementation defined and its usage is discouraged.
Instead it is recommend to call std::free instead (which is also the default implementation inside wren).

Please find my merge request that improves the code in this regard.
Best regards
Michael

@matusnovak
Copy link
Owner

Hi Michael. Thank you for your contribution!

I have enabled GitHub actions. Linux x64 build failed for unrelated reasons, don't worry about it.

Merging.

@matusnovak matusnovak merged commit 5fff54a into matusnovak:master Feb 15, 2025
4 of 5 checks passed
@matusnovak
Copy link
Owner

I have created a new tag: https://github.com/matusnovak/wrenbind17/releases/tag/v1.3.1

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.

2 participants