better definitions for some reason

This commit is contained in:
PancakeTAS 2025-07-02 10:01:19 +02:00
parent a7df89824c
commit 260026beed
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -124,10 +124,10 @@ namespace Loader::DL {
} }
/// Modified version of the dlopen function. /// Modified version of the dlopen function.
extern "C" void* dlopen(const char* filename, int flag); extern "C" void* dlopen(const char* filename, int flag) noexcept;
/// Modified version of the dlsym function. /// Modified version of the dlsym function.
extern "C" void* dlsym(void* handle, const char* symbol); extern "C" void* dlsym(void* handle, const char* symbol) noexcept;
/// Modified version of the dlclose function. /// Modified version of the dlclose function.
extern "C" int dlclose(void* handle); extern "C" int dlclose(void* handle) noexcept;
#endif // DL_HPP #endif // DL_HPP

View file

@ -75,7 +75,7 @@ void DL::registerFile(const File& file) {
void DL::disableHooks() { enable_hooks = false; } void DL::disableHooks() { enable_hooks = false; }
void DL::enableHooks() { enable_hooks = true; } void DL::enableHooks() { enable_hooks = true; }
extern "C" void* dlopen(const char* filename, int flag) { void* dlopen(const char* filename, int flag) noexcept {
auto& files = overrides(); auto& files = overrides();
auto& loaded = handles(); auto& loaded = handles();
@ -102,7 +102,7 @@ extern "C" void* dlopen(const char* filename, int flag) {
return file.getHandle(); return file.getHandle();
} }
extern "C" void* dlsym(void* handle, const char* symbol) { void* dlsym(void* handle, const char* symbol) noexcept {
const auto& files = overrides(); const auto& files = overrides();
if (!enable_hooks || !handle || !symbol) if (!enable_hooks || !handle || !symbol)
@ -126,7 +126,7 @@ extern "C" void* dlsym(void* handle, const char* symbol) {
return func; return func;
} }
extern "C" int dlclose(void* handle) { int dlclose(void* handle) noexcept {
auto& files = overrides(); auto& files = overrides();
auto& loaded = handles(); auto& loaded = handles();