Skip to content
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

add memory function accessors #468

Merged
merged 6 commits into from
Oct 22, 2024
Merged

Conversation

tertyshnyi
Copy link
Contributor

image
I added new 3 functions stumpless_get_malloc(), stumpless_get_free(), stumpless_get_realloc(). And added pointer and null tests to them. Is this enough?

@tertyshnyi
Copy link
Contributor Author

memory function accessors + tests

@goatshriek goatshriek self-assigned this Oct 20, 2024
@tertyshnyi
Copy link
Contributor Author

I removed the function I mistakenly added earlier, it should work now.

@goatshriek
Copy link
Owner

This is off to a great start, and I especially appreciate that you updated the test macros to use the new functions. A few things to help you get this over the finish line: don't forget to add the functions to src/windows/stumpless.def, and move the declarations in include/stumpless/memory.h within the extern "C" block so that the C++ name mangling isn't mistakenly applied to them.

@tertyshnyi
Copy link
Contributor Author

Thanks for the tip. I wrote functions in stumpless.def and wrote functions in extern “C” memory.h . I also changed the tests, removed the check for null because get functions do not return null, added 3 new ones that custom functions correctly replace standard functions and can be retrieved.

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.60%. Comparing base (1d2df58) to head (4845825).
Report is 1 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest     #468      +/-   ##
==========================================
+ Coverage   90.59%   90.60%   +0.01%     
==========================================
  Files          47       47              
  Lines        4379     4385       +6     
  Branches      587      587              
==========================================
+ Hits         3967     3973       +6     
  Misses        279      279              
  Partials      133      133              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@goatshriek goatshriek merged commit e01c679 into goatshriek:latest Oct 22, 2024
56 checks passed
@goatshriek goatshriek added the hacktoberfest-accepted accepted work that is valid for hacktoberfest label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted accepted work that is valid for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants