From 66b103180e168c597f3c246c68a9886b69707493 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 16 Oct 2024 00:38:39 +0800 Subject: Move C interface from slang.h to slang-deprecated.h (#5301) * Squash redundant move warnings * Move C interface from slang.h to slang-deprecated.h spGetBuildTagString remains, because it's useful to have before the global session exists. This C API is used quite pervasively in the C++ helpers (for example slang::UserAttribute. It's not trivial to move these to slang-deprecated.h as they're entangled with some enums which are themselves used elsewhere in the compiler. The fact that these helpers use the C API can be viewed as an implementation detail for now, and this usage moved to slang-deprecated in due course. Closes https://github.com/shader-slang/slang/issues/4758 * Squash warnings for our usage of our deprecated API --------- Co-authored-by: Yong He --- source/slang/slang-api.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-api.cpp') diff --git a/source/slang/slang-api.cpp b/source/slang/slang-api.cpp index 412cec0d4..ccecc74e1 100644 --- a/source/slang/slang-api.cpp +++ b/source/slang/slang-api.cpp @@ -225,7 +225,9 @@ SLANG_API SlangCompileRequest* spCreateCompileRequest( { slang::ICompileRequest* request = nullptr; // Will return with suitable ref count + SLANG_ALLOW_DEPRECATED_BEGIN session->createCompileRequest(&request); + SLANG_ALLOW_DEPRECATED_END return request; } -- cgit v1.2.3