zscan 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/pack/pack-27.c +1 -0
- data/ext/pack/pack.c +1 -0
- data/ext/pack/ruby/backward/2/assume.h +43 -0
- data/ext/pack/ruby/backward/2/attributes.h +157 -0
- data/ext/pack/ruby/backward/2/bool.h +37 -0
- data/ext/pack/ruby/backward/2/extern.h +46 -0
- data/ext/pack/ruby/backward/2/gcc_version_since.h +38 -0
- data/ext/pack/ruby/backward/2/inttypes.h +132 -0
- data/ext/pack/ruby/backward/2/limits.h +100 -0
- data/ext/pack/ruby/backward/2/long_long.h +65 -0
- data/ext/pack/ruby/backward/2/r_cast.h +27 -0
- data/ext/pack/ruby/backward/2/rmodule.h +31 -0
- data/ext/pack/ruby/backward/2/stdalign.h +30 -0
- data/ext/pack/ruby/backward/2/stdarg.h +47 -0
- data/ext/pack/ruby/backward/classext.h +25 -0
- data/ext/pack/ruby/backward/rubyio.h +18 -0
- data/ext/pack/ruby/backward/rubysig.h +26 -0
- data/ext/pack/ruby/backward/st.h +18 -0
- data/ext/pack/ruby/backward/util.h +18 -0
- data/ext/pack/ruby/internal/anyargs.h +375 -0
- data/ext/pack/ruby/internal/arithmetic.h +38 -0
- data/ext/pack/ruby/internal/arithmetic/char.h +58 -0
- data/ext/pack/ruby/internal/arithmetic/double.h +39 -0
- data/ext/pack/ruby/internal/arithmetic/fixnum.h +44 -0
- data/ext/pack/ruby/internal/arithmetic/gid_t.h +34 -0
- data/ext/pack/ruby/internal/arithmetic/int.h +163 -0
- data/ext/pack/ruby/internal/arithmetic/intptr_t.h +42 -0
- data/ext/pack/ruby/internal/arithmetic/long.h +244 -0
- data/ext/pack/ruby/internal/arithmetic/long_long.h +53 -0
- data/ext/pack/ruby/internal/arithmetic/mode_t.h +34 -0
- data/ext/pack/ruby/internal/arithmetic/off_t.h +49 -0
- data/ext/pack/ruby/internal/arithmetic/pid_t.h +34 -0
- data/ext/pack/ruby/internal/arithmetic/short.h +54 -0
- data/ext/pack/ruby/internal/arithmetic/size_t.h +51 -0
- data/ext/pack/ruby/internal/arithmetic/st_data_t.h +59 -0
- data/ext/pack/ruby/internal/arithmetic/uid_t.h +34 -0
- data/ext/pack/ruby/internal/assume.h +90 -0
- data/ext/pack/ruby/internal/attr/alloc_size.h +32 -0
- data/ext/pack/ruby/internal/attr/artificial.h +46 -0
- data/ext/pack/ruby/internal/attr/cold.h +37 -0
- data/ext/pack/ruby/internal/attr/const.h +46 -0
- data/ext/pack/ruby/internal/attr/constexpr.h +85 -0
- data/ext/pack/ruby/internal/attr/deprecated.h +59 -0
- data/ext/pack/ruby/internal/attr/diagnose_if.h +42 -0
- data/ext/pack/ruby/internal/attr/enum_extensibility.h +32 -0
- data/ext/pack/ruby/internal/attr/error.h +32 -0
- data/ext/pack/ruby/internal/attr/flag_enum.h +33 -0
- data/ext/pack/ruby/internal/attr/forceinline.h +40 -0
- data/ext/pack/ruby/internal/attr/format.h +38 -0
- data/ext/pack/ruby/internal/attr/maybe_unused.h +38 -0
- data/ext/pack/ruby/internal/attr/noalias.h +58 -0
- data/ext/pack/ruby/internal/attr/nodiscard.h +45 -0
- data/ext/pack/ruby/internal/attr/noexcept.h +91 -0
- data/ext/pack/ruby/internal/attr/noinline.h +35 -0
- data/ext/pack/ruby/internal/attr/nonnull.h +32 -0
- data/ext/pack/ruby/internal/attr/noreturn.h +48 -0
- data/ext/pack/ruby/internal/attr/pure.h +43 -0
- data/ext/pack/ruby/internal/attr/restrict.h +45 -0
- data/ext/pack/ruby/internal/attr/returns_nonnull.h +37 -0
- data/ext/pack/ruby/internal/attr/warning.h +32 -0
- data/ext/pack/ruby/internal/attr/weakref.h +32 -0
- data/ext/pack/ruby/internal/cast.h +53 -0
- data/ext/pack/ruby/internal/compiler_is.h +45 -0
- data/ext/pack/ruby/internal/compiler_is/apple.h +41 -0
- data/ext/pack/ruby/internal/compiler_is/clang.h +38 -0
- data/ext/pack/ruby/internal/compiler_is/gcc.h +46 -0
- data/ext/pack/ruby/internal/compiler_is/intel.h +41 -0
- data/ext/pack/ruby/internal/compiler_is/msvc.h +57 -0
- data/ext/pack/ruby/internal/compiler_is/sunpro.h +55 -0
- data/ext/pack/ruby/internal/compiler_since.h +61 -0
- data/ext/pack/ruby/internal/config.h +131 -0
- data/ext/pack/ruby/internal/constant_p.h +37 -0
- data/ext/pack/ruby/internal/core.h +35 -0
- data/ext/pack/ruby/internal/core/rarray.h +275 -0
- data/ext/pack/ruby/internal/core/rbasic.h +85 -0
- data/ext/pack/ruby/internal/core/rbignum.h +51 -0
- data/ext/pack/ruby/internal/core/rclass.h +47 -0
- data/ext/pack/ruby/internal/core/rdata.h +174 -0
- data/ext/pack/ruby/internal/core/rfile.h +36 -0
- data/ext/pack/ruby/internal/core/rhash.h +62 -0
- data/ext/pack/ruby/internal/core/rmatch.h +73 -0
- data/ext/pack/ruby/internal/core/robject.h +97 -0
- data/ext/pack/ruby/internal/core/rregexp.h +84 -0
- data/ext/pack/ruby/internal/core/rstring.h +215 -0
- data/ext/pack/ruby/internal/core/rstruct.h +73 -0
- data/ext/pack/ruby/internal/core/rtypeddata.h +184 -0
- data/ext/pack/ruby/internal/ctype.h +203 -0
- data/ext/pack/ruby/internal/dllexport.h +92 -0
- data/ext/pack/ruby/internal/dosish.h +63 -0
- data/ext/pack/ruby/internal/error.h +74 -0
- data/ext/pack/ruby/internal/eval.h +50 -0
- data/ext/pack/ruby/internal/event.h +75 -0
- data/ext/pack/ruby/internal/fl_type.h +469 -0
- data/ext/pack/ruby/internal/gc.h +35 -0
- data/ext/pack/ruby/internal/glob.h +35 -0
- data/ext/pack/ruby/internal/globals.h +159 -0
- data/ext/pack/ruby/internal/has/attribute.h +164 -0
- data/ext/pack/ruby/internal/has/builtin.h +105 -0
- data/ext/pack/ruby/internal/has/c_attribute.h +38 -0
- data/ext/pack/ruby/internal/has/cpp_attribute.h +79 -0
- data/ext/pack/ruby/internal/has/declspec_attribute.h +48 -0
- data/ext/pack/ruby/internal/has/extension.h +33 -0
- data/ext/pack/ruby/internal/has/feature.h +31 -0
- data/ext/pack/ruby/internal/has/warning.h +31 -0
- data/ext/pack/ruby/internal/intern/array.h +78 -0
- data/ext/pack/ruby/internal/intern/bignum.h +105 -0
- data/ext/pack/ruby/internal/intern/class.h +57 -0
- data/ext/pack/ruby/internal/intern/compar.h +34 -0
- data/ext/pack/ruby/internal/intern/complex.h +60 -0
- data/ext/pack/ruby/internal/intern/cont.h +40 -0
- data/ext/pack/ruby/internal/intern/dir.h +33 -0
- data/ext/pack/ruby/internal/intern/enum.h +33 -0
- data/ext/pack/ruby/internal/intern/enumerator.h +79 -0
- data/ext/pack/ruby/internal/intern/error.h +82 -0
- data/ext/pack/ruby/internal/intern/eval.h +59 -0
- data/ext/pack/ruby/internal/intern/file.h +44 -0
- data/ext/pack/ruby/internal/intern/gc.h +57 -0
- data/ext/pack/ruby/internal/intern/hash.h +59 -0
- data/ext/pack/ruby/internal/intern/io.h +70 -0
- data/ext/pack/ruby/internal/intern/load.h +39 -0
- data/ext/pack/ruby/internal/intern/marshal.h +35 -0
- data/ext/pack/ruby/internal/intern/numeric.h +42 -0
- data/ext/pack/ruby/internal/intern/object.h +90 -0
- data/ext/pack/ruby/internal/intern/parse.h +64 -0
- data/ext/pack/ruby/internal/intern/proc.h +53 -0
- data/ext/pack/ruby/internal/intern/process.h +46 -0
- data/ext/pack/ruby/internal/intern/random.h +45 -0
- data/ext/pack/ruby/internal/intern/range.h +35 -0
- data/ext/pack/ruby/internal/intern/rational.h +46 -0
- data/ext/pack/ruby/internal/intern/re.h +50 -0
- data/ext/pack/ruby/internal/intern/ruby.h +37 -0
- data/ext/pack/ruby/internal/intern/select.h +52 -0
- data/ext/pack/ruby/internal/intern/select/largesize.h +103 -0
- data/ext/pack/ruby/internal/intern/select/posix.h +82 -0
- data/ext/pack/ruby/internal/intern/select/win32.h +124 -0
- data/ext/pack/ruby/internal/intern/signal.h +40 -0
- data/ext/pack/ruby/internal/intern/sprintf.h +43 -0
- data/ext/pack/ruby/internal/intern/string.h +290 -0
- data/ext/pack/ruby/internal/intern/struct.h +47 -0
- data/ext/pack/ruby/internal/intern/thread.h +76 -0
- data/ext/pack/ruby/internal/intern/time.h +52 -0
- data/ext/pack/ruby/internal/intern/variable.h +83 -0
- data/ext/pack/ruby/internal/intern/vm.h +77 -0
- data/ext/pack/ruby/internal/interpreter.h +94 -0
- data/ext/pack/ruby/internal/iterator.h +65 -0
- data/ext/pack/ruby/internal/memory.h +286 -0
- data/ext/pack/ruby/internal/method.h +39 -0
- data/ext/pack/ruby/internal/module.h +39 -0
- data/ext/pack/ruby/internal/newobj.h +73 -0
- data/ext/pack/ruby/internal/rgengc.h +199 -0
- data/ext/pack/ruby/internal/scan_args.h +394 -0
- data/ext/pack/ruby/internal/special_consts.h +204 -0
- data/ext/pack/ruby/internal/static_assert.h +77 -0
- data/ext/pack/ruby/internal/stdalign.h +124 -0
- data/ext/pack/ruby/internal/stdbool.h +51 -0
- data/ext/pack/ruby/internal/symbol.h +114 -0
- data/ext/pack/ruby/internal/token_paste.h +75 -0
- data/ext/pack/ruby/internal/value.h +66 -0
- data/ext/pack/ruby/internal/value_type.h +354 -0
- data/ext/pack/ruby/internal/variable.h +62 -0
- data/ext/pack/ruby/internal/warning_push.h +91 -0
- data/ext/pack/ruby/internal/xmalloc.h +201 -0
- data/lib/zscan.rb +1 -1
- data/readme.md +2 -0
- data/zscan.gemspec +1 -1
- metadata +162 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3894d3f7d0ead9fcf41188af7cc4b8ba3d5c7c130c3cbaf2279d7290aca00ec3
|
|
4
|
+
data.tar.gz: c3b2fae78cb9a1c04065dbdaa423337c3671aeb99b7795a3af9ce9eac29122e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40508f68fd13aba0efea341a630c810948165fbfad0d9102cc202394e0812cabf47f991d1f6bd24bd498311ff09dd001ae358ab51a3b0467fdd70153d2a97d66
|
|
7
|
+
data.tar.gz: d8bceb00cf89b24276c96f780edec48b37875ee68e0c6d4de319dafa4d6e0fb636ca4cbfae9b935541e9ac9682edb507393d6da858f92d56ed746771e86c2dec
|
data/ext/pack/pack-27.c
CHANGED
data/ext/pack/pack.c
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_ASSUME_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief Defines #ASSUME / #RB_LIKELY / #UNREACHABLE
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/config.h"
|
|
24
|
+
#include "ruby/internal/assume.h"
|
|
25
|
+
#include "ruby/internal/has/builtin.h"
|
|
26
|
+
|
|
27
|
+
#undef ASSUME /* Kill config.h definition */
|
|
28
|
+
#undef UNREACHABLE /* Kill config.h definition */
|
|
29
|
+
#define ASSUME RBIMPL_ASSUME
|
|
30
|
+
#define UNREACHABLE RBIMPL_UNREACHABLE()
|
|
31
|
+
#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN
|
|
32
|
+
|
|
33
|
+
/* likely */
|
|
34
|
+
#if RBIMPL_HAS_BUILTIN(__builtin_expect)
|
|
35
|
+
# define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
|
|
36
|
+
# define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
|
|
37
|
+
|
|
38
|
+
#else
|
|
39
|
+
# define RB_LIKELY(x) (x)
|
|
40
|
+
# define RB_UNLIKELY(x) (x)
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#endif /* RUBY_BACKWARD2_ASSUME_H */
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_ATTRIBUTES_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_ATTRIBUTES_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief Various attribute-related macros.
|
|
22
|
+
*
|
|
23
|
+
* ### Q&A ###
|
|
24
|
+
*
|
|
25
|
+
* - Q: Why are the macros defined in this header file so inconsistent in
|
|
26
|
+
* style?
|
|
27
|
+
*
|
|
28
|
+
* - A: Don't know. Don't blame me. Backward compatibility is the key here.
|
|
29
|
+
* I'm just preserving what they have been.
|
|
30
|
+
*/
|
|
31
|
+
#include "ruby/internal/config.h"
|
|
32
|
+
#include "ruby/internal/attr/alloc_size.h"
|
|
33
|
+
#include "ruby/internal/attr/cold.h"
|
|
34
|
+
#include "ruby/internal/attr/const.h"
|
|
35
|
+
#include "ruby/internal/attr/deprecated.h"
|
|
36
|
+
#include "ruby/internal/attr/error.h"
|
|
37
|
+
#include "ruby/internal/attr/forceinline.h"
|
|
38
|
+
#include "ruby/internal/attr/format.h"
|
|
39
|
+
#include "ruby/internal/attr/maybe_unused.h"
|
|
40
|
+
#include "ruby/internal/attr/noinline.h"
|
|
41
|
+
#include "ruby/internal/attr/nonnull.h"
|
|
42
|
+
#include "ruby/internal/attr/noreturn.h"
|
|
43
|
+
#include "ruby/internal/attr/pure.h"
|
|
44
|
+
#include "ruby/internal/attr/restrict.h"
|
|
45
|
+
#include "ruby/internal/attr/returns_nonnull.h"
|
|
46
|
+
#include "ruby/internal/attr/warning.h"
|
|
47
|
+
#include "ruby/internal/has/attribute.h"
|
|
48
|
+
|
|
49
|
+
/* function attributes */
|
|
50
|
+
#undef CONSTFUNC
|
|
51
|
+
#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
|
|
52
|
+
|
|
53
|
+
#undef PUREFUNC
|
|
54
|
+
#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
|
|
55
|
+
|
|
56
|
+
#undef DEPRECATED
|
|
57
|
+
#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
|
|
58
|
+
|
|
59
|
+
#undef DEPRECATED_BY
|
|
60
|
+
#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x
|
|
61
|
+
|
|
62
|
+
#undef DEPRECATED_TYPE
|
|
63
|
+
#define DEPRECATED_TYPE(mseg, decl) decl RBIMPL_ATTR_DEPRECATED(mseg)
|
|
64
|
+
|
|
65
|
+
#undef RUBY_CXX_DEPRECATED
|
|
66
|
+
#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
|
|
67
|
+
|
|
68
|
+
#undef NOINLINE
|
|
69
|
+
#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
|
|
70
|
+
|
|
71
|
+
#ifndef MJIT_HEADER
|
|
72
|
+
# undef ALWAYS_INLINE
|
|
73
|
+
# define ALWAYS_INLINE(x) RBIMPL_ATTR_FORCEINLINE() x
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
#undef ERRORFUNC
|
|
77
|
+
#define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x
|
|
78
|
+
#if RBIMPL_HAS_ATTRIBUTE(error)
|
|
79
|
+
# define HAVE_ATTRIBUTE_ERRORFUNC 1
|
|
80
|
+
#else
|
|
81
|
+
# define HAVE_ATTRIBUTE_ERRORFUNC 0
|
|
82
|
+
#endif
|
|
83
|
+
|
|
84
|
+
#undef WARNINGFUNC
|
|
85
|
+
#define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x
|
|
86
|
+
#if RBIMPL_HAS_ATTRIBUTE(warning)
|
|
87
|
+
# define HAVE_ATTRIBUTE_WARNINGFUNC 1
|
|
88
|
+
#else
|
|
89
|
+
# define HAVE_ATTRIBUTE_WARNINGFUNC 0
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
cold attribute for code layout improvements
|
|
94
|
+
RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros
|
|
95
|
+
*/
|
|
96
|
+
#undef COLDFUNC
|
|
97
|
+
#define COLDFUNC RBIMPL_ATTR_COLD()
|
|
98
|
+
|
|
99
|
+
#define PRINTF_ARGS(decl, string_index, first_to_check) \
|
|
100
|
+
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) \
|
|
101
|
+
decl
|
|
102
|
+
|
|
103
|
+
#undef RUBY_ATTR_ALLOC_SIZE
|
|
104
|
+
#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
|
|
105
|
+
|
|
106
|
+
#undef RUBY_ATTR_MALLOC
|
|
107
|
+
#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
|
|
108
|
+
|
|
109
|
+
#undef RUBY_ATTR_RETURNS_NONNULL
|
|
110
|
+
#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
|
|
111
|
+
|
|
112
|
+
#ifndef FUNC_MINIMIZED
|
|
113
|
+
#define FUNC_MINIMIZED(x) x
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
#ifndef FUNC_UNOPTIMIZED
|
|
117
|
+
#define FUNC_UNOPTIMIZED(x) x
|
|
118
|
+
#endif
|
|
119
|
+
|
|
120
|
+
#ifndef RUBY_ALIAS_FUNCTION_TYPE
|
|
121
|
+
#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \
|
|
122
|
+
FUNC_MINIMIZED(type prot) {return (type)name args;}
|
|
123
|
+
#endif
|
|
124
|
+
|
|
125
|
+
#ifndef RUBY_ALIAS_FUNCTION_VOID
|
|
126
|
+
#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \
|
|
127
|
+
FUNC_MINIMIZED(void prot) {name args;}
|
|
128
|
+
#endif
|
|
129
|
+
|
|
130
|
+
#ifndef RUBY_ALIAS_FUNCTION
|
|
131
|
+
#define RUBY_ALIAS_FUNCTION(prot, name, args) \
|
|
132
|
+
RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
|
|
133
|
+
#endif
|
|
134
|
+
|
|
135
|
+
#undef RUBY_FUNC_NONNULL
|
|
136
|
+
#define RUBY_FUNC_NONNULL(n, x) RBIMPL_ATTR_NONNULL(n) x
|
|
137
|
+
|
|
138
|
+
#undef NORETURN
|
|
139
|
+
#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
|
|
140
|
+
#define NORETURN_STYLE_NEW
|
|
141
|
+
|
|
142
|
+
#ifndef PACKED_STRUCT
|
|
143
|
+
# define PACKED_STRUCT(x) x
|
|
144
|
+
#endif
|
|
145
|
+
|
|
146
|
+
#ifndef PACKED_STRUCT_UNALIGNED
|
|
147
|
+
# if UNALIGNED_WORD_ACCESS
|
|
148
|
+
# define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
|
|
149
|
+
# else
|
|
150
|
+
# define PACKED_STRUCT_UNALIGNED(x) x
|
|
151
|
+
# endif
|
|
152
|
+
#endif
|
|
153
|
+
|
|
154
|
+
#undef RB_UNUSED_VAR
|
|
155
|
+
#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
|
|
156
|
+
|
|
157
|
+
#endif /* RUBY_BACKWARD2_ATTRIBUTES_H */
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_BOOL_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_BOOL_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief Defines old #TRUE / #FALSE
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/stdbool.h"
|
|
24
|
+
|
|
25
|
+
#ifndef FALSE
|
|
26
|
+
# define FALSE false
|
|
27
|
+
#elif FALSE
|
|
28
|
+
# error FALSE must be false
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#ifndef TRUE
|
|
32
|
+
# define TRUE true
|
|
33
|
+
#elif ! TRUE
|
|
34
|
+
# error TRUE must be true
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
#endif /* RUBY_BACKWARD2_BOOL_H */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_EXTERN_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_EXTERN_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief Defines old #EXTERN
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/config.h" /* for STRINGIZE */
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @brief Synonym of #RUBY_EXTERN.
|
|
27
|
+
* @deprecated #EXTERN is deprecated, use #RUBY_EXTERN instead.
|
|
28
|
+
*/
|
|
29
|
+
#if defined __GNUC__
|
|
30
|
+
# define EXTERN \
|
|
31
|
+
_Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \
|
|
32
|
+
RUBY_EXTERN
|
|
33
|
+
|
|
34
|
+
#elif defined _MSC_VER
|
|
35
|
+
# pragma deprecated(EXTERN)
|
|
36
|
+
# define EXTERN \
|
|
37
|
+
__pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: " \
|
|
38
|
+
"EXTERN is deprecated, use RUBY_EXTERN instead")) \
|
|
39
|
+
RUBY_EXTERN
|
|
40
|
+
|
|
41
|
+
#else
|
|
42
|
+
# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
|
|
43
|
+
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
#endif /* RUBY_BACKWARD2_EXTERN_H */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_GCC_VERSION_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief Defines old #GCC_VERSION_SINCE
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/compiler_since.h"
|
|
24
|
+
|
|
25
|
+
#ifndef GCC_VERSION_SINCE
|
|
26
|
+
#define GCC_VERSION_SINCE(x, y, z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#ifndef GCC_VERSION_BEFORE
|
|
30
|
+
#define GCC_VERSION_BEFORE(x, y, z) \
|
|
31
|
+
(RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || \
|
|
32
|
+
(RBIMPL_COMPILER_IS(GCC) && \
|
|
33
|
+
((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
|
|
34
|
+
((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
|
|
35
|
+
(RBIMPL_COMPILER_VERSION_PATCH == (z))))))
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
#endif /* RUBY_BACKWARD2_GCC_VERSION_SINCE_H */
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
#ifndef RUBY_BACKWARD2_INTTYPES_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RUBY_BACKWARD2_INTTYPES_H
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
* @author Ruby developers <ruby-core@ruby-lang.org>
|
|
6
|
+
* @copyright This file is a part of the programming language Ruby.
|
|
7
|
+
* Permission is hereby granted, to either redistribute and/or
|
|
8
|
+
* modify this file, provided that the conditions mentioned in the
|
|
9
|
+
* file COPYING are met. Consult the file for details.
|
|
10
|
+
* @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are
|
|
11
|
+
* implementation details. Don't take them as canon. They could
|
|
12
|
+
* rapidly appear then vanish. The name (path) of this header file
|
|
13
|
+
* is also an implementation detail. Do not expect it to persist
|
|
14
|
+
* at the place it is now. Developers are free to move it anywhere
|
|
15
|
+
* anytime at will.
|
|
16
|
+
* @note To ruby-core: remember that this header can be possibly
|
|
17
|
+
* recursively included from extension libraries written in C++.
|
|
18
|
+
* Do not expect for instance `__VA_ARGS__` is always available.
|
|
19
|
+
* We assume C99 for ruby itself but we don't assume languages of
|
|
20
|
+
* extension libraries. They could be written in C++98.
|
|
21
|
+
* @brief C99 shim for `<inttypes.h>`
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/config.h" /* PRI_LL_PREFIX etc. are here */
|
|
24
|
+
|
|
25
|
+
#ifdef HAVE_INTTYPES_H
|
|
26
|
+
# include <inttypes.h>
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#include "ruby/internal/value.h" /* PRI_VALUE_PREFIX is here. */
|
|
30
|
+
|
|
31
|
+
#ifndef PRI_INT_PREFIX
|
|
32
|
+
# define PRI_INT_PREFIX ""
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
#ifndef PRI_LONG_PREFIX
|
|
36
|
+
# define PRI_LONG_PREFIX "l"
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
#ifndef PRI_SHORT_PREFIX
|
|
40
|
+
# define PRI_SHORT_PREFIX "h"
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#ifdef PRI_64_PREFIX
|
|
44
|
+
# /* Take that. */
|
|
45
|
+
#elif SIZEOF_LONG == 8
|
|
46
|
+
# define PRI_64_PREFIX PRI_LONG_PREFIX
|
|
47
|
+
#elif SIZEOF_LONG_LONG == 8
|
|
48
|
+
# define PRI_64_PREFIX PRI_LL_PREFIX
|
|
49
|
+
#endif
|
|
50
|
+
|
|
51
|
+
#ifndef PRIdPTR
|
|
52
|
+
# define PRIdPTR PRI_PTR_PREFIX"d"
|
|
53
|
+
# define PRIiPTR PRI_PTR_PREFIX"i"
|
|
54
|
+
# define PRIoPTR PRI_PTR_PREFIX"o"
|
|
55
|
+
# define PRIuPTR PRI_PTR_PREFIX"u"
|
|
56
|
+
# define PRIxPTR PRI_PTR_PREFIX"x"
|
|
57
|
+
# define PRIXPTR PRI_PTR_PREFIX"X"
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
#ifndef RUBY_PRI_VALUE_MARK
|
|
61
|
+
# define RUBY_PRI_VALUE_MARK "\v"
|
|
62
|
+
#endif
|
|
63
|
+
|
|
64
|
+
#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
|
|
65
|
+
# define PRIdVALUE PRIdPTR
|
|
66
|
+
# define PRIoVALUE PRIoPTR
|
|
67
|
+
# define PRIuVALUE PRIuPTR
|
|
68
|
+
# define PRIxVALUE PRIxPTR
|
|
69
|
+
# define PRIXVALUE PRIXPTR
|
|
70
|
+
# define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK
|
|
71
|
+
#else
|
|
72
|
+
# define PRIdVALUE PRI_VALUE_PREFIX"d"
|
|
73
|
+
# define PRIoVALUE PRI_VALUE_PREFIX"o"
|
|
74
|
+
# define PRIuVALUE PRI_VALUE_PREFIX"u"
|
|
75
|
+
# define PRIxVALUE PRI_VALUE_PREFIX"x"
|
|
76
|
+
# define PRIXVALUE PRI_VALUE_PREFIX"X"
|
|
77
|
+
# define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
|
|
78
|
+
#endif
|
|
79
|
+
|
|
80
|
+
#ifndef PRI_VALUE_PREFIX
|
|
81
|
+
# define PRI_VALUE_PREFIX ""
|
|
82
|
+
#endif
|
|
83
|
+
|
|
84
|
+
#ifdef PRI_TIMET_PREFIX
|
|
85
|
+
# /* Take that. */
|
|
86
|
+
#elif SIZEOF_TIME_T == SIZEOF_INT
|
|
87
|
+
# define PRI_TIMET_PREFIX
|
|
88
|
+
#elif SIZEOF_TIME_T == SIZEOF_LONG
|
|
89
|
+
# define PRI_TIMET_PREFIX "l"
|
|
90
|
+
#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
|
|
91
|
+
# define PRI_TIMET_PREFIX PRI_LL_PREFIX
|
|
92
|
+
#endif
|
|
93
|
+
|
|
94
|
+
#ifdef PRI_PTRDIFF_PREFIX
|
|
95
|
+
# /* Take that. */
|
|
96
|
+
#elif SIZEOF_PTRDIFF_T == SIZEOF_INT
|
|
97
|
+
# define PRI_PTRDIFF_PREFIX ""
|
|
98
|
+
#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
|
|
99
|
+
# define PRI_PTRDIFF_PREFIX "l"
|
|
100
|
+
#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
|
|
101
|
+
# define PRI_PTRDIFF_PREFIX PRI_LL_PREFIX
|
|
102
|
+
#endif
|
|
103
|
+
|
|
104
|
+
#ifndef PRIdPTRDIFF
|
|
105
|
+
# define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
|
|
106
|
+
# define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
|
|
107
|
+
# define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
|
|
108
|
+
# define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
|
|
109
|
+
# define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
|
|
110
|
+
# define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
|
|
111
|
+
#endif
|
|
112
|
+
|
|
113
|
+
#ifdef PRI_SIZE_PREFIX
|
|
114
|
+
# /* Take that. */
|
|
115
|
+
#elif SIZEOF_SIZE_T == SIZEOF_INT
|
|
116
|
+
# define PRI_SIZE_PREFIX ""
|
|
117
|
+
#elif SIZEOF_SIZE_T == SIZEOF_LONG
|
|
118
|
+
# define PRI_SIZE_PREFIX "l"
|
|
119
|
+
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
|
|
120
|
+
# define PRI_SIZE_PREFIX PRI_LL_PREFIX
|
|
121
|
+
#endif
|
|
122
|
+
|
|
123
|
+
#ifndef PRIdSIZE
|
|
124
|
+
# define PRIdSIZE PRI_SIZE_PREFIX"d"
|
|
125
|
+
# define PRIiSIZE PRI_SIZE_PREFIX"i"
|
|
126
|
+
# define PRIoSIZE PRI_SIZE_PREFIX"o"
|
|
127
|
+
# define PRIuSIZE PRI_SIZE_PREFIX"u"
|
|
128
|
+
# define PRIxSIZE PRI_SIZE_PREFIX"x"
|
|
129
|
+
# define PRIXSIZE PRI_SIZE_PREFIX"X"
|
|
130
|
+
#endif
|
|
131
|
+
|
|
132
|
+
#endif /* RUBY_BACKWARD2_INTTYPES_H */
|