Blender V4.3
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
11#if OSL_LIBRARY_VERSION_CODE >= 11302
12typedef OSL::ustringhash OSLUStringHash;
13typedef OSL::ustringrep OSLUStringRep;
14
15static inline OSL::ustring to_ustring(OSLUStringHash h)
16{
17 return OSL::ustring::from_hash(h.hash());
18}
19
20#else
21typedef OSL::ustring OSLUStringHash;
22typedef OSL::ustring OSLUStringRep;
23
24static inline OSL::ustring to_ustring(OSLUStringHash h)
25{
26 return h;
27}
28#endif
29
#define CCL_NAMESPACE_END
static OSL::ustring to_ustring(OSLUStringHash h)
Definition osl/compat.h:24
CCL_NAMESPACE_BEGIN typedef OSL::ustring OSLUStringHash
Definition osl/compat.h:21
OSL::ustring OSLUStringRep
Definition osl/compat.h:22