diff options
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-blob.h | 11 | ||||
| -rw-r--r-- | source/core/slang-castable-list-impl.h | 2 | ||||
| -rw-r--r-- | source/core/slang-shared-library.cpp | 12 | ||||
| -rw-r--r-- | source/core/slang-shared-library.h | 24 |
4 files changed, 7 insertions, 42 deletions
diff --git a/source/core/slang-blob.h b/source/core/slang-blob.h index 8a9ab5dea..49bfd4a17 100644 --- a/source/core/slang-blob.h +++ b/source/core/slang-blob.h @@ -284,30 +284,29 @@ protected: size_t m_dataCount; }; -class ScopeRefObjectBlob : public BlobBase +class ScopeBlob : public BlobBase { public: // ISlangBlob SLANG_NO_THROW void const* SLANG_MCALL getBufferPointer() SLANG_OVERRIDE { return m_blob->getBufferPointer(); } SLANG_NO_THROW size_t SLANG_MCALL getBufferSize() SLANG_OVERRIDE { return m_blob->getBufferSize(); } - static inline ComPtr<ISlangBlob> create(ISlangBlob* blob, RefObject* scope) + static inline ComPtr<ISlangBlob> create(ISlangBlob* blob, ISlangUnknown* scope) { - return ComPtr<ISlangBlob>(new ScopeRefObjectBlob(blob, scope)); + return ComPtr<ISlangBlob>(new ScopeBlob(blob, scope)); } protected: // Ctor - ScopeRefObjectBlob(ISlangBlob* blob, RefObject* scope) : + ScopeBlob(ISlangBlob* blob, ISlangUnknown* scope) : m_blob(blob), m_scope(scope) { } - - RefPtr<RefObject> m_scope; + ComPtr<ISlangUnknown> m_scope; ComPtr<ISlangBlob> m_blob; }; diff --git a/source/core/slang-castable-list-impl.h b/source/core/slang-castable-list-impl.h index 7a7f98a6a..adbd121fb 100644 --- a/source/core/slang-castable-list-impl.h +++ b/source/core/slang-castable-list-impl.h @@ -35,6 +35,8 @@ public: virtual ICastable* SLANG_MCALL findWithPredicate(FindFunc func, void* data) SLANG_OVERRIDE; virtual ICastable*const* SLANG_MCALL getBuffer() SLANG_OVERRIDE { return m_list.getBuffer(); } + static ComPtr<ICastableList> create() { return ComPtr<ICastableList>(new CastableList); } + /// Dtor virtual ~CastableList(); diff --git a/source/core/slang-shared-library.cpp b/source/core/slang-shared-library.cpp index 35440ac9e..e0fe82012 100644 --- a/source/core/slang-shared-library.cpp +++ b/source/core/slang-shared-library.cpp @@ -62,18 +62,6 @@ SlangResult DefaultSharedLibraryLoader::loadPlatformSharedLibrary(const char* pa } } -/* !!!!!!!!!!!!!!!!!!!!!!!!!! TemporarySharedLibrary !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ - -TemporarySharedLibrary::~TemporarySharedLibrary() -{ - if (m_sharedLibraryHandle) - { - // We have to unload if we want to be able to remove - SharedLibrary::unload(m_sharedLibraryHandle); - m_sharedLibraryHandle = nullptr; - } -} - /* !!!!!!!!!!!!!!!!!!!!!!!!!! ScopeSharedLibrary !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ ScopeSharedLibrary::~ScopeSharedLibrary() diff --git a/source/core/slang-shared-library.h b/source/core/slang-shared-library.h index 0a63e570e..9015219b1 100644 --- a/source/core/slang-shared-library.h +++ b/source/core/slang-shared-library.h @@ -76,30 +76,6 @@ class DefaultSharedLibrary : public ISlangSharedLibrary, public ComBaseObject SharedLibrary::Handle m_sharedLibraryHandle = nullptr; }; -class TemporarySharedLibrary : public DefaultSharedLibrary -{ -public: - typedef DefaultSharedLibrary Super; - - /// Get the path to the shared library - const String& getPath() const { return m_path; } - - /// Ctor - TemporarySharedLibrary(const SharedLibrary::Handle sharedLibraryHandle, const String& path): - Super(sharedLibraryHandle), - m_path(path) - { - } - - virtual ~TemporarySharedLibrary(); - - /// Any files specified in this set will be deleted on exit - RefPtr<TemporaryFileSet> m_temporaryFileSet; - -protected: - String m_path; -}; - class ScopeSharedLibrary : public DefaultSharedLibrary { public: |
