Fix potential crash for Encoder.Convert (#20522)
[mono-project.git] / mono / profiler / proftest-pinvokes.c
blob85e2a8719b53fa862eefb683e552c193ce470b76
1 #include <config.h>
3 #include <stdio.h>
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
10 #ifdef WIN32
11 #define STDCALL __stdcall
12 #else
13 #define STDCALL
14 #endif
16 #if defined(WIN32) && defined (_MSC_VER)
17 #define LIBTEST_API __declspec(dllexport)
18 #elif defined(__GNUC__)
19 #define LIBTEST_API __attribute__ ((__visibility__ ("default")))
20 #else
21 #define LIBTEST_API
22 #endif
24 typedef void (STDCALL *fn_ptr) (void);
26 LIBTEST_API void STDCALL
27 test_reverse_pinvoke (fn_ptr p);
29 #ifdef __cplusplus
31 #endif
35 void STDCALL
36 test_reverse_pinvoke (fn_ptr p)
38 printf ("testfunc called\n");
39 p ();