forked from loongly/PureScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntime.h
More file actions
67 lines (51 loc) · 1.63 KB
/
Copy pathruntime.h
File metadata and controls
67 lines (51 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
//
// runtime.h
// test-runner
//
// Created by Zoltan Varga on 11/12/17.
// Copyright © 2017 Zoltan Varga. All rights reserved.
//
#ifndef runtime_h
#define runtime_h
#include <mono/jit/jit.h>
//#include <mono/metadata/object.h>
#define DEBUG 1
#if __ANDROID__
#include "runtime_android.h"
#endif
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_TV || TARGET_TVOS_SIMULATOR
#define RUNTIME_IOS 1
#endif
#if defined(__cplusplus)
extern "C"
{
#endif // __cplusplus
#if __ANDROID__
#define platform_log(FORMAT, ...) _log(FORMAT, ##__VA_ARGS__)
#else
#define platform_log(FORMAT, ...) _platform_log(FORMAT, ##__VA_ARGS__)
#endif
#if __ANDROID__
#define sprintf_s(BUFFER, SIZE, FORMAT, ...) snprintf(BUFFER, SIZE, FORMAT, ##__VA_ARGS__)
#else
#define sprintf_s(BUFFER, SIZE, FORMAT, ...) sprintf_s(BUFFER, SIZE, FORMAT, ##__VA_ARGS__)
#endif
#if __ANDROID__
#define wprintf_s(BUFFER, SIZE, FORMAT, ...) swprintf(BUFFER, SIZE, FORMAT, ##__VA_ARGS__)
#else
#define wprintf_s(BUFFER, SIZE, FORMAT, ...) wprintf_s(BUFFER, SIZE, FORMAT, ##__VA_ARGS__)
#endif
void _platform_log(const char* _format, ...);
extern MonoDomain *g_domain;
typedef void(*print_log)(char* data);
int mono_setup(char* reloadDir, const char* dllName);
int mono_exit();
void set_log_callback(print_log callback);
MonoAssembly* load_assembly(const char *name, const char *culture);
MonoObject * mono_exception_property(MonoObject *obj, const char *name, char is_virtual);
const char * runtime_bundle_path(void);
#if defined(__cplusplus)
}
#endif // __cplusplus
#endif /* runtime_h */