diff options
Diffstat (limited to 'source/core/slang-shared-library.cpp')
| -rw-r--r-- | source/core/slang-shared-library.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/core/slang-shared-library.cpp b/source/core/slang-shared-library.cpp index 1513b420f..f31c7d689 100644 --- a/source/core/slang-shared-library.cpp +++ b/source/core/slang-shared-library.cpp @@ -78,6 +78,8 @@ TemporarySharedLibrary::~TemporarySharedLibrary() SLANG_NO_THROW SlangResult SLANG_MCALL DefaultSharedLibrary::queryInterface(SlangUUID const& uuid, void** outObject) { + // Mechanism to cast to underlying type. + // NOTE! Purposefully does not ref count if (uuid == DefaultSharedLibrary::getTypeGuid()) { *outObject = this; @@ -86,7 +88,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DefaultSharedLibrary::queryInterface(Slan if (uuid == ISlangUnknown::getTypeGuid() || uuid == ISlangSharedLibrary::getTypeGuid()) { - addReference(); + ++m_refCount; *outObject = static_cast<ISlangSharedLibrary*>(this); return SLANG_OK; } @@ -106,7 +108,6 @@ void* DefaultSharedLibrary::findSymbolAddressByName(char const* name) return SharedLibrary::findSymbolAddressByName(m_sharedLibraryHandle, name); } - String SharedLibraryUtils::getSharedLibraryFileName(void* symbolInLib) { #if defined(_WIN32) |
