Ruby  3.4.0dev (2024-11-05 revision 348a53415339076afc4a02fcd09f3ae36e9c4c61)
dllexport.h
Go to the documentation of this file.
1 #ifndef RBIMPL_DLLEXPORT_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_DLLEXPORT_H
23 #include "ruby/internal/config.h"
25 
39 #undef RUBY_EXTERN
40 #if defined(RUBY_EXPORT)
41 # define RUBY_EXTERN extern
42 #elif defined(_WIN32)
43 # define RUBY_EXTERN extern __declspec(dllimport)
44 #else
45 # define RUBY_EXTERN extern
46 #endif
47 
48 #ifndef RUBY_SYMBOL_EXPORT_BEGIN
49 # define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
50 #endif
51 
52 #ifndef RUBY_SYMBOL_EXPORT_END
53 # define RUBY_SYMBOL_EXPORT_END /* end */
54 #endif
55 
56 #ifndef RUBY_FUNC_EXPORTED
57 # define RUBY_FUNC_EXPORTED /* void */
58 #endif
59 
64 #if defined(__DOXYGEN__)
65 # define RBIMPL_SYMBOL_EXPORT_BEGIN() /* void */
66 #elif defined(__cplusplus)
67 # define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN extern "C" {
68 #else
69 # define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
70 #endif
71 
73 #if defined(__DOXYGEN__)
74 # define RBIMPL_SYMBOL_EXPORT_END() /* void */
75 #elif defined(__cplusplus)
76 # define RBIMPL_SYMBOL_EXPORT_END() } RUBY_SYMBOL_EXPORT_END
77 #else
78 # define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
79 #endif
80 #endif /* RBIMPL_DLLEXPORT_H */
Defines RBIMPL_COMPILER_IS.