[coop] Refactor/reuse mono_value_box_handle/mono_value_box_checked and reduce raw...
[mono-project.git] / mono / utils / mono-dl-fallback.h
blob0383ad1c9068e6fc6f4bfc3fad0d67622030b721
1 /**
2 * \file
3 */
5 #ifndef __MONO_UTILS_DL_FALLBACK_H__
6 #define __MONO_UTILS_DL_FALLBACK_H__
8 #include <mono/utils/mono-publib.h>
10 MONO_BEGIN_DECLS
12 enum {
13 MONO_DL_EAGER = 0,
14 MONO_DL_LAZY = 1,
15 MONO_DL_LOCAL = 2,
16 MONO_DL_MASK = 3
20 * This is the dynamic loader fallback API
22 typedef struct MonoDlFallbackHandler MonoDlFallbackHandler;
25 * The "err" variable contents must be allocated using g_malloc or g_strdup
27 typedef void* (*MonoDlFallbackLoad) (const char *name, int flags, char **err, void *user_data);
28 typedef void* (*MonoDlFallbackSymbol) (void *handle, const char *name, char **err, void *user_data);
29 typedef void* (*MonoDlFallbackClose) (void *handle, void *user_data);
31 MONO_API MonoDlFallbackHandler *mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func,
32 MonoDlFallbackClose close_func, void *user_data);
34 MONO_API void mono_dl_fallback_unregister (MonoDlFallbackHandler *handler);
36 MONO_END_DECLS
38 #endif /* __MONO_UTILS_DL_FALLBACK_H__ */