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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_CLASS_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_CLASS_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 Public APIs related to ::rb_cClass/::rb_cModule.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
#include "ruby/backward/2/stdarg.h"
|
|
26
|
+
|
|
27
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
28
|
+
|
|
29
|
+
/* class.c */
|
|
30
|
+
VALUE rb_class_new(VALUE);
|
|
31
|
+
VALUE rb_mod_init_copy(VALUE, VALUE);
|
|
32
|
+
VALUE rb_singleton_class_clone(VALUE);
|
|
33
|
+
void rb_singleton_class_attached(VALUE,VALUE);
|
|
34
|
+
void rb_check_inheritable(VALUE);
|
|
35
|
+
VALUE rb_define_class_id(ID, VALUE);
|
|
36
|
+
VALUE rb_define_class_id_under(VALUE, ID, VALUE);
|
|
37
|
+
VALUE rb_module_new(void);
|
|
38
|
+
VALUE rb_define_module_id(ID);
|
|
39
|
+
VALUE rb_define_module_id_under(VALUE, ID);
|
|
40
|
+
VALUE rb_mod_included_modules(VALUE);
|
|
41
|
+
VALUE rb_mod_include_p(VALUE, VALUE);
|
|
42
|
+
VALUE rb_mod_ancestors(VALUE);
|
|
43
|
+
VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
|
|
44
|
+
VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
|
|
45
|
+
VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
|
|
46
|
+
VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
|
|
47
|
+
VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
|
|
48
|
+
void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
|
|
49
|
+
void rb_undef(VALUE, ID);
|
|
50
|
+
void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
|
|
51
|
+
void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
|
|
52
|
+
void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
|
|
53
|
+
VALUE rb_singleton_class(VALUE);
|
|
54
|
+
|
|
55
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
56
|
+
|
|
57
|
+
#endif /* RBIMPL_INTERN_CLASS_H */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_COMPAR_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_COMPAR_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 Public APIs related to ::rb_mComparable.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
|
|
26
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
27
|
+
|
|
28
|
+
/* compar.c */
|
|
29
|
+
int rb_cmpint(VALUE, VALUE, VALUE);
|
|
30
|
+
NORETURN(void rb_cmperr(VALUE, VALUE));
|
|
31
|
+
|
|
32
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
33
|
+
|
|
34
|
+
#endif /* RBIMPL_INTERN_COMPAR_H */
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_COMPLEX_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 Public APIs related to ::rb_cComplex.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
#include "ruby/internal/arithmetic/long.h" /* INT2FIX is here. */
|
|
26
|
+
|
|
27
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
28
|
+
|
|
29
|
+
/* complex.c */
|
|
30
|
+
VALUE rb_complex_raw(VALUE, VALUE);
|
|
31
|
+
#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
|
|
32
|
+
#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
|
|
33
|
+
VALUE rb_complex_new(VALUE, VALUE);
|
|
34
|
+
#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
|
|
35
|
+
#define rb_complex_new2(x,y) rb_complex_new((x), (y))
|
|
36
|
+
VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
|
|
37
|
+
DEPRECATED_BY(rb_complex_new_polar, VALUE rb_complex_polar(VALUE abs, VALUE arg));
|
|
38
|
+
VALUE rb_complex_real(VALUE z);
|
|
39
|
+
VALUE rb_complex_imag(VALUE z);
|
|
40
|
+
VALUE rb_complex_plus(VALUE x, VALUE y);
|
|
41
|
+
VALUE rb_complex_minus(VALUE x, VALUE y);
|
|
42
|
+
VALUE rb_complex_mul(VALUE x, VALUE y);
|
|
43
|
+
VALUE rb_complex_div(VALUE x, VALUE y);
|
|
44
|
+
VALUE rb_complex_uminus(VALUE z);
|
|
45
|
+
VALUE rb_complex_conjugate(VALUE z);
|
|
46
|
+
VALUE rb_complex_abs(VALUE z);
|
|
47
|
+
VALUE rb_complex_arg(VALUE z);
|
|
48
|
+
VALUE rb_complex_pow(VALUE base, VALUE exp);
|
|
49
|
+
VALUE rb_dbl_complex_new(double real, double imag);
|
|
50
|
+
#define rb_complex_add rb_complex_plus
|
|
51
|
+
#define rb_complex_sub rb_complex_minus
|
|
52
|
+
#define rb_complex_nagate rb_complex_uminus
|
|
53
|
+
|
|
54
|
+
VALUE rb_Complex(VALUE, VALUE);
|
|
55
|
+
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
|
|
56
|
+
#define rb_Complex2(x,y) rb_Complex((x), (y))
|
|
57
|
+
|
|
58
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
59
|
+
|
|
60
|
+
#endif /* RBIMPL_INTERN_COMPLEX_H */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_CONT_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 Public APIs related to rb_cFiber.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
#include "ruby/internal/iterator.h"
|
|
26
|
+
|
|
27
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
28
|
+
|
|
29
|
+
/* cont.c */
|
|
30
|
+
VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
|
|
31
|
+
VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
|
|
32
|
+
VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
|
|
33
|
+
VALUE rb_fiber_yield(int argc, const VALUE *argv);
|
|
34
|
+
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
|
|
35
|
+
VALUE rb_fiber_current(void);
|
|
36
|
+
VALUE rb_fiber_alive_p(VALUE);
|
|
37
|
+
|
|
38
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
39
|
+
|
|
40
|
+
#endif /* RBIMPL_INTERN_CONT_H */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_DIR_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_DIR_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 Public APIs related to ::rb_cDir.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
|
|
26
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
27
|
+
|
|
28
|
+
/* dir.c */
|
|
29
|
+
VALUE rb_dir_getwd(void);
|
|
30
|
+
|
|
31
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
32
|
+
|
|
33
|
+
#endif /* RBIMPL_INTERN_DIR_H */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_ENUM_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 Public APIs related to ::rb_mEnumerable.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
|
|
26
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
27
|
+
|
|
28
|
+
/* enum.c */
|
|
29
|
+
VALUE rb_enum_values_pack(int, const VALUE*);
|
|
30
|
+
|
|
31
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
32
|
+
|
|
33
|
+
#endif /* RBIMPL_INTERN_ENUM_H */
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_ENUMERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_ENUMERATOR_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 Public APIs related to ::rb_cEnumerator.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/intern/eval.h" /* rb_frame_this_func */
|
|
25
|
+
#include "ruby/internal/iterator.h" /* rb_block_given_p */
|
|
26
|
+
#include "ruby/internal/symbol.h"
|
|
27
|
+
#include "ruby/internal/value.h"
|
|
28
|
+
|
|
29
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
30
|
+
|
|
31
|
+
typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
|
|
32
|
+
|
|
33
|
+
typedef struct {
|
|
34
|
+
VALUE begin;
|
|
35
|
+
VALUE end;
|
|
36
|
+
VALUE step;
|
|
37
|
+
int exclude_end;
|
|
38
|
+
} rb_arithmetic_sequence_components_t;
|
|
39
|
+
|
|
40
|
+
/* enumerator.c */
|
|
41
|
+
VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
|
|
42
|
+
VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
|
|
43
|
+
VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
|
|
44
|
+
int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *);
|
|
45
|
+
|
|
46
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
47
|
+
|
|
48
|
+
#ifndef RUBY_EXPORT
|
|
49
|
+
# define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
|
|
50
|
+
rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
|
|
51
|
+
# define rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) \
|
|
52
|
+
rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat)
|
|
53
|
+
#endif
|
|
54
|
+
|
|
55
|
+
#define SIZED_ENUMERATOR(obj, argc, argv, size_fn) \
|
|
56
|
+
rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \
|
|
57
|
+
(argc), (argv), (size_fn))
|
|
58
|
+
|
|
59
|
+
#define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \
|
|
60
|
+
rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), \
|
|
61
|
+
(argc), (argv), (size_fn), (kw_splat))
|
|
62
|
+
|
|
63
|
+
#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
|
|
64
|
+
if (!rb_block_given_p()) \
|
|
65
|
+
return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \
|
|
66
|
+
} while (0)
|
|
67
|
+
|
|
68
|
+
#define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) do { \
|
|
69
|
+
if (!rb_block_given_p()) \
|
|
70
|
+
return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); \
|
|
71
|
+
} while (0)
|
|
72
|
+
|
|
73
|
+
#define RETURN_ENUMERATOR(obj, argc, argv) \
|
|
74
|
+
RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
|
|
75
|
+
|
|
76
|
+
#define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) \
|
|
77
|
+
RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
|
|
78
|
+
|
|
79
|
+
#endif /* RBIMPL_INTERN_ENUMERATOR_H */
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_ERROR_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 Public APIs related to ::rb_eException.
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/dllexport.h"
|
|
24
|
+
#include "ruby/internal/value.h"
|
|
25
|
+
#include "ruby/internal/fl_type.h"
|
|
26
|
+
#include "ruby/backward/2/assume.h"
|
|
27
|
+
#include "ruby/backward/2/attributes.h"
|
|
28
|
+
|
|
29
|
+
#define UNLIMITED_ARGUMENTS (-1)
|
|
30
|
+
#define rb_exc_new2 rb_exc_new_cstr
|
|
31
|
+
#define rb_exc_new3 rb_exc_new_str
|
|
32
|
+
#define rb_check_trusted rb_check_trusted
|
|
33
|
+
#define rb_check_trusted_inline rb_check_trusted
|
|
34
|
+
#define rb_check_arity rb_check_arity
|
|
35
|
+
|
|
36
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
37
|
+
|
|
38
|
+
/* error.c */
|
|
39
|
+
VALUE rb_exc_new(VALUE, const char*, long);
|
|
40
|
+
VALUE rb_exc_new_cstr(VALUE, const char*);
|
|
41
|
+
VALUE rb_exc_new_str(VALUE, VALUE);
|
|
42
|
+
PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
|
|
43
|
+
PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3);
|
|
44
|
+
PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
|
|
45
|
+
PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3);
|
|
46
|
+
PRINTF_ARGS(NORETURN(void rb_frozen_error_raise(VALUE, const char*, ...)), 2, 3);
|
|
47
|
+
NORETURN(void rb_invalid_str(const char*, const char*));
|
|
48
|
+
NORETURN(void rb_error_frozen(const char*));
|
|
49
|
+
NORETURN(void rb_error_frozen_object(VALUE));
|
|
50
|
+
void rb_error_untrusted(VALUE);
|
|
51
|
+
void rb_check_frozen(VALUE);
|
|
52
|
+
void rb_check_trusted(VALUE);
|
|
53
|
+
void rb_check_copyable(VALUE obj, VALUE orig);
|
|
54
|
+
NORETURN(MJIT_STATIC void rb_error_arity(int, int, int));
|
|
55
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
56
|
+
|
|
57
|
+
/* Does anyone use this? Remain not deleted for compatibility. */
|
|
58
|
+
#define rb_check_frozen_internal(obj) do { \
|
|
59
|
+
VALUE frozen_obj = (obj); \
|
|
60
|
+
if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { \
|
|
61
|
+
rb_error_frozen_object(frozen_obj); \
|
|
62
|
+
} \
|
|
63
|
+
} while (0)
|
|
64
|
+
|
|
65
|
+
static inline void
|
|
66
|
+
rb_check_frozen_inline(VALUE obj)
|
|
67
|
+
{
|
|
68
|
+
if (RB_UNLIKELY(RB_OBJ_FROZEN(obj))) {
|
|
69
|
+
rb_error_frozen_object(obj);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
#define rb_check_frozen rb_check_frozen_inline
|
|
73
|
+
|
|
74
|
+
static inline int
|
|
75
|
+
rb_check_arity(int argc, int min, int max)
|
|
76
|
+
{
|
|
77
|
+
if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max))
|
|
78
|
+
rb_error_arity(argc, min, max);
|
|
79
|
+
return argc;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#endif /* RBIMPL_INTERN_ERROR_H */
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#ifndef RBIMPL_INTERN_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
2
|
+
#define RBIMPL_INTERN_EVAL_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 Pre-1.9 era evaluator APIs (now considered miscellaneous).
|
|
22
|
+
*/
|
|
23
|
+
#include "ruby/internal/attr/noreturn.h"
|
|
24
|
+
#include "ruby/internal/dllexport.h"
|
|
25
|
+
#include "ruby/internal/value.h"
|
|
26
|
+
|
|
27
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
|
28
|
+
|
|
29
|
+
/* eval.c */
|
|
30
|
+
RBIMPL_ATTR_NORETURN()
|
|
31
|
+
void rb_exc_raise(VALUE);
|
|
32
|
+
|
|
33
|
+
RBIMPL_ATTR_NORETURN()
|
|
34
|
+
void rb_exc_fatal(VALUE);
|
|
35
|
+
|
|
36
|
+
RBIMPL_ATTR_NORETURN()
|
|
37
|
+
VALUE rb_f_exit(int, const VALUE*);
|
|
38
|
+
|
|
39
|
+
RBIMPL_ATTR_NORETURN()
|
|
40
|
+
VALUE rb_f_abort(int, const VALUE*);
|
|
41
|
+
|
|
42
|
+
RBIMPL_ATTR_NORETURN()
|
|
43
|
+
void rb_interrupt(void);
|
|
44
|
+
ID rb_frame_this_func(void);
|
|
45
|
+
|
|
46
|
+
RBIMPL_ATTR_NORETURN()
|
|
47
|
+
void rb_jump_tag(int);
|
|
48
|
+
void rb_obj_call_init(VALUE, int, const VALUE*);
|
|
49
|
+
void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
|
|
50
|
+
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
|
|
51
|
+
ID rb_frame_callee(void);
|
|
52
|
+
VALUE rb_make_exception(int, const VALUE*);
|
|
53
|
+
|
|
54
|
+
/* eval_jump.c */
|
|
55
|
+
void rb_set_end_proc(void (*)(VALUE), VALUE);
|
|
56
|
+
|
|
57
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
|
58
|
+
|
|
59
|
+
#endif /* RBIMPL_INTERN_EVAL_H */
|