Blender V5.0
osl/compat.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2023 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#include <OSL/oslconfig.h>
8
10
11using OSLUStringHash = OSL::ustringhash;
12#if OSL_LIBRARY_VERSION_CODE >= 11400
13using OSLUStringRep = OSL::ustringhash;
14#else
15using OSLUStringRep = OSL::ustringrep;
16#endif
17
18static inline OSL::ustring to_ustring(OSLUStringHash h)
19{
20 return OSL::ustring::from_hash(h.hash());
21}
22
#define CCL_NAMESPACE_END
OSL::ustringhash OSLUStringHash
Definition osl/compat.h:11
OSL::ustringrep OSLUStringRep
Definition osl/compat.h:15
static OSL::ustring to_ustring(OSLUStringHash h)
Definition osl/compat.h:18