From c1cc93dd962a6db6c839341f11d2654cf0e62e37 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 8 Aug 2019 16:09:29 -0400 Subject: Make SlangSession an alias for slang::IGlobalSession (#1011) * Make SlangSession an alias for slang::IGlobalSession. Use asInternal/asExternal for casting in slang.cpp Special case handling of asInternal which argument dependent lookup doesn't find. * To improve implementation asInternal/asExternal in slang.cpp - tried making the internal impls forward to the Slang:: implementations. This caused ambiguities (for example when a function has using namespace Slang in it). To avoid these problems and make it clear where implementation is coming from use Slang::asInternal and removed the forwarding functions. Made the impls SLANG_FORCE_INLINE instead of inline. * Made asInternal/asExternal use SLANG_FORCE_INLINE uniformly. --- slang.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 583072686..281aeba6a 100644 --- a/slang.h +++ b/slang.h @@ -1055,10 +1055,14 @@ extern "C" #define SLANG_UUID_ISlangWriter { 0xec457f0e, 0x9add, 0x4e6b,{ 0x85, 0x1c, 0xd7, 0xfa, 0x71, 0x6d, 0x15, 0xfd } }; + namespace slang { + struct IGlobalSession; + } // namespace slang + /*! @brief An instance of the Slang library. */ - typedef struct SlangSession SlangSession; + typedef slang::IGlobalSession SlangSession; typedef struct SlangProgramLayout SlangProgramLayout; -- cgit v1.2.3