Skip to content

Commit

Permalink
expose libc::free
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNumbat committed Jan 28, 2024
1 parent d2939bc commit 85cf202
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions rpp/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void* memcpy(void* dest, const void* src, u64 bytes) noexcept;
[[nodiscard]] i32 snprintf(u8* buffer, u64 buffer_size, const char* fmt, ...) noexcept;
[[nodiscard]] i64 strtoll(const char* str, char** endptr, i32 base) noexcept;
[[nodiscard]] f32 strtof(const char* str, char** endptr) noexcept;
void free(void* ptr) noexcept;
void keep_alive() noexcept;

} // namespace Libc
Expand Down
4 changes: 4 additions & 0 deletions rpp/impl/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ namespace rpp::Libc {
void keep_alive() noexcept {
}

void free(void* ptr) noexcept {
::free(ptr);
}

void exit(i32 code) noexcept {
::exit(code);
}
Expand Down

0 comments on commit 85cf202

Please sign in to comment.