From cc0b81350f6b681c794b4ac7c0f3b5fe73cb19eb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 1 Sep 2022 16:39:08 -0400 Subject: Make ISlangFileSystem derive from ICastable (#2386) * #include an absolute path didn't work - because paths were taken to always be relative. * Make ISlangFileSystem derive from ICastable. * Make ArchiveFileSystem into an interface Make file systems atomically reference counted. * Small fix. * Some small fixes to work around issues of ICastable on ISlangFileSystem * Use ISlangFileSystem derived type instead of IArchiveFileSystem. Can always get other interface with castAs. * Some small fixes around change of interface returned from archive type functions. * Remove CacheFileSystem member from linkage. Can access easily from m_fileSystemExt if necessary with as cast. * Fix RiffFileSystem casting issue. * Add a check around CacheFileSystem. --- source/slang/slang-api.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-api.cpp') diff --git a/source/slang/slang-api.cpp b/source/slang/slang-api.cpp index 50986660b..a3b1e5409 100644 --- a/source/slang/slang-api.cpp +++ b/source/slang/slang-api.cpp @@ -831,10 +831,10 @@ SLANG_API SlangResult spLoadReproAsFileSystem( MemoryOffsetBase base; base.set(buffer.getBuffer(), buffer.getCount()); - RefPtr cacheFileSystem; - SLANG_RETURN_ON_FAIL(ReproUtil::loadFileSystem(base, requestState, replaceFileSystem, cacheFileSystem)); + ComPtr fileSystem; + SLANG_RETURN_ON_FAIL(ReproUtil::loadFileSystem(base, requestState, replaceFileSystem, fileSystem)); - *outFileSystem = cacheFileSystem.detach(); + *outFileSystem = fileSystem.detach(); return SLANG_OK; } -- cgit v1.2.3