diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/dynlib.cpp | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/dynlib.cpp')
-rw-r--r-- | util/system/dynlib.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/dynlib.cpp b/util/system/dynlib.cpp index 7a3a2d4a29..9d2541c25f 100644 --- a/util/system/dynlib.cpp +++ b/util/system/dynlib.cpp @@ -25,7 +25,7 @@ using HINSTANCE = void*; #define DLLSYM(hndl, name) dlsym(hndl, name) #endif -inline TString DLLERR() { +inline TString DLLERR() { #ifdef _unix_ return dlerror(); #endif @@ -38,7 +38,7 @@ inline TString DLLERR() { return "DLLERR() unknown error"; while (cnt && isspace(msg[cnt - 1])) --cnt; - TString err(msg, 0, cnt); + TString err(msg, 0, cnt); LocalFree(msg); return err; #endif @@ -67,13 +67,13 @@ public: return new TImpl(path, flags); } - inline ~TImpl() { + inline ~TImpl() { if (Module && Unloadable) { DLLCLOSE(Module); } } - inline void* SymOptional(const char* name) noexcept { + inline void* SymOptional(const char* name) noexcept { return (void*)DLLSYM(Module, name); } @@ -96,10 +96,10 @@ private: bool Unloadable; }; -TDynamicLibrary::TDynamicLibrary() noexcept { +TDynamicLibrary::TDynamicLibrary() noexcept { } -TDynamicLibrary::TDynamicLibrary(const TString& path, int flags) { +TDynamicLibrary::TDynamicLibrary(const TString& path, int flags) { Open(path.data(), flags); } @@ -109,11 +109,11 @@ void TDynamicLibrary::Open(const char* path, int flags) { Impl_.Reset(TImpl::SafeCreate(path, flags)); } -void TDynamicLibrary::Close() noexcept { +void TDynamicLibrary::Close() noexcept { Impl_.Destroy(); } -void* TDynamicLibrary::SymOptional(const char* name) noexcept { +void* TDynamicLibrary::SymOptional(const char* name) noexcept { if (!IsLoaded()) { return nullptr; } @@ -129,7 +129,7 @@ void* TDynamicLibrary::Sym(const char* name) { return Impl_->Sym(name); } -bool TDynamicLibrary::IsLoaded() const noexcept { +bool TDynamicLibrary::IsLoaded() const noexcept { return (bool)Impl_.Get(); } |