summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-artifact-helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core/slang-artifact-helper.cpp')
-rw-r--r--source/compiler-core/slang-artifact-helper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/compiler-core/slang-artifact-helper.cpp b/source/compiler-core/slang-artifact-helper.cpp
index 39e81b668..49b9e547e 100644
--- a/source/compiler-core/slang-artifact-helper.cpp
+++ b/source/compiler-core/slang-artifact-helper.cpp
@@ -8,6 +8,7 @@
#include "slang-artifact-util.h"
#include "../core/slang-castable-list-impl.h"
+#include "../core/slang-castable-util.h"
#include "../core/slang-file-system.h"
#include "../core/slang-io.h"
@@ -126,4 +127,17 @@ void DefaultArtifactHelper::getCastable(ISlangUnknown* unk, ICastable** outCasta
*outCastable = CastableUtil::getCastable(unk).detach();
}
+SlangResult DefaultArtifactHelper::createCastableList(const Guid& guid, ICastableList** outList)
+{
+ auto list = new CastableList;
+ if (auto ptr = list->getInterface(guid))
+ {
+ list->addRef();
+ *outList = (ICastableList*)ptr;
+ return SLANG_OK;
+ }
+ delete list;
+ return SLANG_E_NO_INTERFACE;
+}
+
} // namespace Slang