Ruby: include/ruby/internal/dllexport.h Source File

Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)

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"
24#include "ruby/internal/compiler_is.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
61
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 */
compiler_is.h
Defines RBIMPL_COMPILER_IS.