Apply changes from https://github.com/dotnet/runtime/commit/eb1756e97d23df13bc6fe798e...
[mono-project.git] / mono / metadata / class-abi-details.h
blobfa822e19c9b116b83511a05cdc86fac8d43baf59
1 /**
2 * \file Declarations of MonoClass field offset functions
3 * Copyright 2018 Microsoft
4 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 */
6 #ifndef __MONO_METADATA_CLASS_ABI_DETAILS_H__
7 #define __MONO_METADATA_CLASS_ABI_DETAILS_H__
9 #include <mono/metadata/class-internals.h>
10 #include <mono/metadata/abi-details.h>
12 #define MONO_CLASS_GETTER(funcname, rettype, optref, argtype, fieldname) /*nothing*/
14 * In-tree profilers are allowed to use the offset functions. So if we're
15 * compiling with --enable-checked-build=private_types, mark the symbols with
16 * MONO_PROFILER_API
18 #ifdef MONO_CLASS_DEF_PRIVATE
19 #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) MONO_PROFILER_API intptr_t funcname (void);
20 #else
21 #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) static inline intptr_t funcname (void) { return MONO_STRUCT_OFFSET (argtype, fieldname); }
22 #endif
23 #include "class-getters.h"
24 #undef MONO_CLASS_GETTER
25 #undef MONO_CLASS_OFFSET
27 #endif /* __MONO_METADATA_CLASS_ABI_DETAILS_H__ */