Last change
on this file since 270 was 270, checked in by coas-nagasima, 7 years ago |
mruby版ECNLプロトタイピング・ツールを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/x-chdr
|
File size:
1.4 KB
|
Rev | Line | |
---|
[270] | 1 | /*
|
---|
| 2 | ** mruby/common.h - mruby common platform definitions
|
---|
| 3 | **
|
---|
| 4 | ** See Copyright Notice in mruby.h
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | #ifndef MRUBY_COMMON_H
|
---|
| 8 | #define MRUBY_COMMON_H
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | #ifdef __cplusplus
|
---|
| 12 | # define MRB_BEGIN_DECL extern "C" {
|
---|
| 13 | # define MRB_END_DECL }
|
---|
| 14 | #else
|
---|
| 15 | /** Start declarations in C mode */
|
---|
| 16 | # define MRB_BEGIN_DECL
|
---|
| 17 | /** End declarations in C mode */
|
---|
| 18 | # define MRB_END_DECL
|
---|
| 19 | #endif
|
---|
| 20 |
|
---|
| 21 | /**
|
---|
| 22 | * Shared compiler macros
|
---|
| 23 | */
|
---|
| 24 | MRB_BEGIN_DECL
|
---|
| 25 |
|
---|
| 26 | /** Declare a function that never returns. */
|
---|
| 27 | #if __STDC_VERSION__ >= 201112L
|
---|
| 28 | # define mrb_noreturn _Noreturn
|
---|
| 29 | #elif defined __GNUC__ && !defined __STRICT_ANSI__
|
---|
| 30 | # define mrb_noreturn __attribute__((noreturn))
|
---|
| 31 | #elif defined _MSC_VER
|
---|
| 32 | # define mrb_noreturn __declspec(noreturn)
|
---|
| 33 | #else
|
---|
| 34 | # define mrb_noreturn
|
---|
| 35 | #endif
|
---|
| 36 |
|
---|
| 37 | /** Mark a function as deprecated. */
|
---|
| 38 | #if defined __GNUC__ && !defined __STRICT_ANSI__
|
---|
| 39 | # define mrb_deprecated __attribute__((deprecated))
|
---|
| 40 | #elif defined _MSC_VER
|
---|
| 41 | # define mrb_deprecated __declspec(deprecated)
|
---|
| 42 | #else
|
---|
| 43 | # define mrb_deprecated
|
---|
| 44 | #endif
|
---|
| 45 |
|
---|
| 46 | /** Declare a function as always inlined. */
|
---|
| 47 | #if defined(_MSC_VER)
|
---|
| 48 | # define MRB_INLINE static __inline
|
---|
| 49 | #else
|
---|
| 50 | # define MRB_INLINE static inline
|
---|
| 51 | #endif
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | /** Declare a public MRuby API function. */
|
---|
| 55 | #if defined(MRB_BUILD_AS_DLL)
|
---|
| 56 | #if defined(MRB_CORE) || defined(MRB_LIB)
|
---|
| 57 | # define MRB_API __declspec(dllexport)
|
---|
| 58 | #else
|
---|
| 59 | # define MRB_API __declspec(dllimport)
|
---|
| 60 | #endif
|
---|
| 61 | #else
|
---|
| 62 | # define MRB_API extern
|
---|
| 63 | #endif
|
---|
| 64 |
|
---|
| 65 | MRB_END_DECL
|
---|
| 66 |
|
---|
| 67 | #endif /* MRUBY_COMMON_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.