mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
include/ruby/internal/dllexport.h: add doxygen
Must not be a bad idea to improve documents. [ci skip]
This commit is contained in:
parent
0d13f5aa73
commit
9febab7afc
Notes:
git
2021-09-10 20:01:46 +09:00
1 changed files with 23 additions and 3 deletions
|
@ -18,13 +18,24 @@
|
|||
* Do not expect for instance `__VA_ARGS__` is always available.
|
||||
* We assume C99 for ruby itself but we don't assume languages of
|
||||
* extension libraries. They could be written in C++98.
|
||||
* @brief Tewaking visibility of C variables/functions.
|
||||
* @brief Tweaking visibility of C variables/functions.
|
||||
*/
|
||||
#include "ruby/internal/config.h"
|
||||
#include "ruby/internal/compiler_is.h"
|
||||
|
||||
/* For MinGW, we need __declspec(dllimport) for RUBY_EXTERN on MJIT.
|
||||
mswin's RUBY_EXTERN already has that. See also: win32/Makefile.sub */
|
||||
/**
|
||||
* Declaration of externally visible global variables. Here "externally" means
|
||||
* they should be visible from extension libraries. Depending on operating
|
||||
* systems (dynamic linkers, to be precise), global variables inside of a DLL
|
||||
* may or may not be visible form outside of that DLL by default. This
|
||||
* declaration manually tweaks that default and ensures the declared variable
|
||||
* be truly globally visible.
|
||||
*
|
||||
* ```CXX
|
||||
* extern VALUE foo; // hidden on some OS
|
||||
* RUBY_EXTERN VALUE foo; // ensure visible
|
||||
* ```
|
||||
*/
|
||||
#undef RUBY_EXTERN
|
||||
#if defined(MJIT_HEADER) && defined(_WIN32)
|
||||
# define RUBY_EXTERN extern __declspec(dllimport)
|
||||
|
@ -48,6 +59,13 @@
|
|||
# define RUBY_FUNC_EXPORTED /* void */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @cond INTERNAL_MACRO
|
||||
*
|
||||
* These MJIT related macros are placed here because translate_mjit_header can
|
||||
* need them. Extension libraries should not touch.
|
||||
*/
|
||||
|
||||
/* These macros are used for functions which are exported only for MJIT
|
||||
and NOT ensured to be exported in future versions. */
|
||||
|
||||
|
@ -71,6 +89,8 @@
|
|||
# define MJIT_STATIC
|
||||
#endif
|
||||
|
||||
/** @endcond */
|
||||
|
||||
/** Shortcut macro equivalent to `RUBY_SYMBOL_EXPORT_BEGIN extern "C" {`.
|
||||
* \@shyouhei finds it handy. */
|
||||
#if defined(__DOXYGEN__)
|
||||
|
|
Loading…
Reference in a new issue