zscan 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/ext/pack/pack-27.c +1 -0
  3. data/ext/pack/pack.c +1 -0
  4. data/ext/pack/ruby/backward/2/assume.h +43 -0
  5. data/ext/pack/ruby/backward/2/attributes.h +157 -0
  6. data/ext/pack/ruby/backward/2/bool.h +37 -0
  7. data/ext/pack/ruby/backward/2/extern.h +46 -0
  8. data/ext/pack/ruby/backward/2/gcc_version_since.h +38 -0
  9. data/ext/pack/ruby/backward/2/inttypes.h +132 -0
  10. data/ext/pack/ruby/backward/2/limits.h +100 -0
  11. data/ext/pack/ruby/backward/2/long_long.h +65 -0
  12. data/ext/pack/ruby/backward/2/r_cast.h +27 -0
  13. data/ext/pack/ruby/backward/2/rmodule.h +31 -0
  14. data/ext/pack/ruby/backward/2/stdalign.h +30 -0
  15. data/ext/pack/ruby/backward/2/stdarg.h +47 -0
  16. data/ext/pack/ruby/backward/classext.h +25 -0
  17. data/ext/pack/ruby/backward/rubyio.h +18 -0
  18. data/ext/pack/ruby/backward/rubysig.h +26 -0
  19. data/ext/pack/ruby/backward/st.h +18 -0
  20. data/ext/pack/ruby/backward/util.h +18 -0
  21. data/ext/pack/ruby/internal/anyargs.h +375 -0
  22. data/ext/pack/ruby/internal/arithmetic.h +38 -0
  23. data/ext/pack/ruby/internal/arithmetic/char.h +58 -0
  24. data/ext/pack/ruby/internal/arithmetic/double.h +39 -0
  25. data/ext/pack/ruby/internal/arithmetic/fixnum.h +44 -0
  26. data/ext/pack/ruby/internal/arithmetic/gid_t.h +34 -0
  27. data/ext/pack/ruby/internal/arithmetic/int.h +163 -0
  28. data/ext/pack/ruby/internal/arithmetic/intptr_t.h +42 -0
  29. data/ext/pack/ruby/internal/arithmetic/long.h +244 -0
  30. data/ext/pack/ruby/internal/arithmetic/long_long.h +53 -0
  31. data/ext/pack/ruby/internal/arithmetic/mode_t.h +34 -0
  32. data/ext/pack/ruby/internal/arithmetic/off_t.h +49 -0
  33. data/ext/pack/ruby/internal/arithmetic/pid_t.h +34 -0
  34. data/ext/pack/ruby/internal/arithmetic/short.h +54 -0
  35. data/ext/pack/ruby/internal/arithmetic/size_t.h +51 -0
  36. data/ext/pack/ruby/internal/arithmetic/st_data_t.h +59 -0
  37. data/ext/pack/ruby/internal/arithmetic/uid_t.h +34 -0
  38. data/ext/pack/ruby/internal/assume.h +90 -0
  39. data/ext/pack/ruby/internal/attr/alloc_size.h +32 -0
  40. data/ext/pack/ruby/internal/attr/artificial.h +46 -0
  41. data/ext/pack/ruby/internal/attr/cold.h +37 -0
  42. data/ext/pack/ruby/internal/attr/const.h +46 -0
  43. data/ext/pack/ruby/internal/attr/constexpr.h +85 -0
  44. data/ext/pack/ruby/internal/attr/deprecated.h +59 -0
  45. data/ext/pack/ruby/internal/attr/diagnose_if.h +42 -0
  46. data/ext/pack/ruby/internal/attr/enum_extensibility.h +32 -0
  47. data/ext/pack/ruby/internal/attr/error.h +32 -0
  48. data/ext/pack/ruby/internal/attr/flag_enum.h +33 -0
  49. data/ext/pack/ruby/internal/attr/forceinline.h +40 -0
  50. data/ext/pack/ruby/internal/attr/format.h +38 -0
  51. data/ext/pack/ruby/internal/attr/maybe_unused.h +38 -0
  52. data/ext/pack/ruby/internal/attr/noalias.h +58 -0
  53. data/ext/pack/ruby/internal/attr/nodiscard.h +45 -0
  54. data/ext/pack/ruby/internal/attr/noexcept.h +91 -0
  55. data/ext/pack/ruby/internal/attr/noinline.h +35 -0
  56. data/ext/pack/ruby/internal/attr/nonnull.h +32 -0
  57. data/ext/pack/ruby/internal/attr/noreturn.h +48 -0
  58. data/ext/pack/ruby/internal/attr/pure.h +43 -0
  59. data/ext/pack/ruby/internal/attr/restrict.h +45 -0
  60. data/ext/pack/ruby/internal/attr/returns_nonnull.h +37 -0
  61. data/ext/pack/ruby/internal/attr/warning.h +32 -0
  62. data/ext/pack/ruby/internal/attr/weakref.h +32 -0
  63. data/ext/pack/ruby/internal/cast.h +53 -0
  64. data/ext/pack/ruby/internal/compiler_is.h +45 -0
  65. data/ext/pack/ruby/internal/compiler_is/apple.h +41 -0
  66. data/ext/pack/ruby/internal/compiler_is/clang.h +38 -0
  67. data/ext/pack/ruby/internal/compiler_is/gcc.h +46 -0
  68. data/ext/pack/ruby/internal/compiler_is/intel.h +41 -0
  69. data/ext/pack/ruby/internal/compiler_is/msvc.h +57 -0
  70. data/ext/pack/ruby/internal/compiler_is/sunpro.h +55 -0
  71. data/ext/pack/ruby/internal/compiler_since.h +61 -0
  72. data/ext/pack/ruby/internal/config.h +131 -0
  73. data/ext/pack/ruby/internal/constant_p.h +37 -0
  74. data/ext/pack/ruby/internal/core.h +35 -0
  75. data/ext/pack/ruby/internal/core/rarray.h +275 -0
  76. data/ext/pack/ruby/internal/core/rbasic.h +85 -0
  77. data/ext/pack/ruby/internal/core/rbignum.h +51 -0
  78. data/ext/pack/ruby/internal/core/rclass.h +47 -0
  79. data/ext/pack/ruby/internal/core/rdata.h +174 -0
  80. data/ext/pack/ruby/internal/core/rfile.h +36 -0
  81. data/ext/pack/ruby/internal/core/rhash.h +62 -0
  82. data/ext/pack/ruby/internal/core/rmatch.h +73 -0
  83. data/ext/pack/ruby/internal/core/robject.h +97 -0
  84. data/ext/pack/ruby/internal/core/rregexp.h +84 -0
  85. data/ext/pack/ruby/internal/core/rstring.h +215 -0
  86. data/ext/pack/ruby/internal/core/rstruct.h +73 -0
  87. data/ext/pack/ruby/internal/core/rtypeddata.h +184 -0
  88. data/ext/pack/ruby/internal/ctype.h +203 -0
  89. data/ext/pack/ruby/internal/dllexport.h +92 -0
  90. data/ext/pack/ruby/internal/dosish.h +63 -0
  91. data/ext/pack/ruby/internal/error.h +74 -0
  92. data/ext/pack/ruby/internal/eval.h +50 -0
  93. data/ext/pack/ruby/internal/event.h +75 -0
  94. data/ext/pack/ruby/internal/fl_type.h +469 -0
  95. data/ext/pack/ruby/internal/gc.h +35 -0
  96. data/ext/pack/ruby/internal/glob.h +35 -0
  97. data/ext/pack/ruby/internal/globals.h +159 -0
  98. data/ext/pack/ruby/internal/has/attribute.h +164 -0
  99. data/ext/pack/ruby/internal/has/builtin.h +105 -0
  100. data/ext/pack/ruby/internal/has/c_attribute.h +38 -0
  101. data/ext/pack/ruby/internal/has/cpp_attribute.h +79 -0
  102. data/ext/pack/ruby/internal/has/declspec_attribute.h +48 -0
  103. data/ext/pack/ruby/internal/has/extension.h +33 -0
  104. data/ext/pack/ruby/internal/has/feature.h +31 -0
  105. data/ext/pack/ruby/internal/has/warning.h +31 -0
  106. data/ext/pack/ruby/internal/intern/array.h +78 -0
  107. data/ext/pack/ruby/internal/intern/bignum.h +105 -0
  108. data/ext/pack/ruby/internal/intern/class.h +57 -0
  109. data/ext/pack/ruby/internal/intern/compar.h +34 -0
  110. data/ext/pack/ruby/internal/intern/complex.h +60 -0
  111. data/ext/pack/ruby/internal/intern/cont.h +40 -0
  112. data/ext/pack/ruby/internal/intern/dir.h +33 -0
  113. data/ext/pack/ruby/internal/intern/enum.h +33 -0
  114. data/ext/pack/ruby/internal/intern/enumerator.h +79 -0
  115. data/ext/pack/ruby/internal/intern/error.h +82 -0
  116. data/ext/pack/ruby/internal/intern/eval.h +59 -0
  117. data/ext/pack/ruby/internal/intern/file.h +44 -0
  118. data/ext/pack/ruby/internal/intern/gc.h +57 -0
  119. data/ext/pack/ruby/internal/intern/hash.h +59 -0
  120. data/ext/pack/ruby/internal/intern/io.h +70 -0
  121. data/ext/pack/ruby/internal/intern/load.h +39 -0
  122. data/ext/pack/ruby/internal/intern/marshal.h +35 -0
  123. data/ext/pack/ruby/internal/intern/numeric.h +42 -0
  124. data/ext/pack/ruby/internal/intern/object.h +90 -0
  125. data/ext/pack/ruby/internal/intern/parse.h +64 -0
  126. data/ext/pack/ruby/internal/intern/proc.h +53 -0
  127. data/ext/pack/ruby/internal/intern/process.h +46 -0
  128. data/ext/pack/ruby/internal/intern/random.h +45 -0
  129. data/ext/pack/ruby/internal/intern/range.h +35 -0
  130. data/ext/pack/ruby/internal/intern/rational.h +46 -0
  131. data/ext/pack/ruby/internal/intern/re.h +50 -0
  132. data/ext/pack/ruby/internal/intern/ruby.h +37 -0
  133. data/ext/pack/ruby/internal/intern/select.h +52 -0
  134. data/ext/pack/ruby/internal/intern/select/largesize.h +103 -0
  135. data/ext/pack/ruby/internal/intern/select/posix.h +82 -0
  136. data/ext/pack/ruby/internal/intern/select/win32.h +124 -0
  137. data/ext/pack/ruby/internal/intern/signal.h +40 -0
  138. data/ext/pack/ruby/internal/intern/sprintf.h +43 -0
  139. data/ext/pack/ruby/internal/intern/string.h +290 -0
  140. data/ext/pack/ruby/internal/intern/struct.h +47 -0
  141. data/ext/pack/ruby/internal/intern/thread.h +76 -0
  142. data/ext/pack/ruby/internal/intern/time.h +52 -0
  143. data/ext/pack/ruby/internal/intern/variable.h +83 -0
  144. data/ext/pack/ruby/internal/intern/vm.h +77 -0
  145. data/ext/pack/ruby/internal/interpreter.h +94 -0
  146. data/ext/pack/ruby/internal/iterator.h +65 -0
  147. data/ext/pack/ruby/internal/memory.h +286 -0
  148. data/ext/pack/ruby/internal/method.h +39 -0
  149. data/ext/pack/ruby/internal/module.h +39 -0
  150. data/ext/pack/ruby/internal/newobj.h +73 -0
  151. data/ext/pack/ruby/internal/rgengc.h +199 -0
  152. data/ext/pack/ruby/internal/scan_args.h +394 -0
  153. data/ext/pack/ruby/internal/special_consts.h +204 -0
  154. data/ext/pack/ruby/internal/static_assert.h +77 -0
  155. data/ext/pack/ruby/internal/stdalign.h +124 -0
  156. data/ext/pack/ruby/internal/stdbool.h +51 -0
  157. data/ext/pack/ruby/internal/symbol.h +114 -0
  158. data/ext/pack/ruby/internal/token_paste.h +75 -0
  159. data/ext/pack/ruby/internal/value.h +66 -0
  160. data/ext/pack/ruby/internal/value_type.h +354 -0
  161. data/ext/pack/ruby/internal/variable.h +62 -0
  162. data/ext/pack/ruby/internal/warning_push.h +91 -0
  163. data/ext/pack/ruby/internal/xmalloc.h +201 -0
  164. data/lib/zscan.rb +1 -1
  165. data/readme.md +2 -0
  166. data/zscan.gemspec +1 -1
  167. metadata +162 -2
@@ -0,0 +1,53 @@
1
+ #ifndef RBIMPL_INTERN_PROC_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_PROC_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_cProc.
22
+ */
23
+ #include "ruby/internal/dllexport.h"
24
+ #include "ruby/internal/iterator.h"
25
+ #include "ruby/internal/value.h"
26
+
27
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
28
+
29
+ /* proc.c */
30
+ VALUE rb_block_proc(void);
31
+ VALUE rb_block_lambda(void);
32
+ VALUE rb_proc_new(rb_block_call_func_t, VALUE);
33
+ VALUE rb_obj_is_proc(VALUE);
34
+ VALUE rb_proc_call(VALUE, VALUE);
35
+ VALUE rb_proc_call_kw(VALUE, VALUE, int);
36
+ VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
37
+ VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int);
38
+ int rb_proc_arity(VALUE);
39
+ VALUE rb_proc_lambda_p(VALUE);
40
+ VALUE rb_binding_new(void);
41
+ VALUE rb_obj_method(VALUE, VALUE);
42
+ VALUE rb_obj_is_method(VALUE);
43
+ VALUE rb_method_call(int, const VALUE*, VALUE);
44
+ VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
45
+ VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
46
+ VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
47
+ int rb_mod_method_arity(VALUE, ID);
48
+ int rb_obj_method_arity(VALUE, ID);
49
+ VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
50
+
51
+ RBIMPL_SYMBOL_EXPORT_END()
52
+
53
+ #endif /* RBIMPL_INTERN_PROC_H */
@@ -0,0 +1,46 @@
1
+ #ifndef RBIMPL_INTERN_PROCESS_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_PROCESS_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_mProcess.
22
+ */
23
+ #include "ruby/internal/attr/noreturn.h"
24
+ #include "ruby/internal/config.h" /* rb_pid_t is defined here. */
25
+ #include "ruby/internal/dllexport.h"
26
+ #include "ruby/internal/value.h"
27
+
28
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
29
+
30
+ /* process.c */
31
+ void rb_last_status_set(int status, rb_pid_t pid);
32
+ VALUE rb_last_status_get(void);
33
+ int rb_proc_exec(const char*);
34
+
35
+ RBIMPL_ATTR_NORETURN()
36
+ VALUE rb_f_exec(int, const VALUE*);
37
+ rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
38
+ void rb_syswait(rb_pid_t pid);
39
+ rb_pid_t rb_spawn(int, const VALUE*);
40
+ rb_pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
41
+ VALUE rb_proc_times(VALUE);
42
+ VALUE rb_detach_process(rb_pid_t pid);
43
+
44
+ RBIMPL_SYMBOL_EXPORT_END()
45
+
46
+ #endif /* RBIMPL_INTERN_PROCESS_H */
@@ -0,0 +1,45 @@
1
+ #ifndef RBIMPL_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_RANDOM_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 MT19937 backended pseudo random number generator.
22
+ * @see Matsumoto, M., Nishimura, T., "Mersenne Twister: A 623-
23
+ * dimensionally equidistributed uniform pseudorandom number
24
+ * generator", ACM Trans. on Modeling and Computer Simulation, 8
25
+ * (1): pp 3-30, 1998. https://doi.org/10.1145/272991.272995
26
+ */
27
+ #include "ruby/internal/dllexport.h"
28
+ #include "ruby/internal/value.h"
29
+
30
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
31
+
32
+ /* random.c */
33
+ unsigned int rb_genrand_int32(void);
34
+ double rb_genrand_real(void);
35
+ void rb_reset_random_seed(void);
36
+ VALUE rb_random_bytes(VALUE rnd, long n);
37
+ VALUE rb_random_int(VALUE rnd, VALUE max);
38
+ unsigned int rb_random_int32(VALUE rnd);
39
+ double rb_random_real(VALUE rnd);
40
+ unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
41
+ unsigned long rb_genrand_ulong_limited(unsigned long i);
42
+
43
+ RBIMPL_SYMBOL_EXPORT_END()
44
+
45
+ #endif /* RBIMPL_INTERN_RANDOM_H */
@@ -0,0 +1,35 @@
1
+ #ifndef RBIMPL_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_RANGE_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_cRange.
22
+ */
23
+ #include "ruby/internal/dllexport.h"
24
+ #include "ruby/internal/value.h"
25
+
26
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
27
+
28
+ /* range.c */
29
+ VALUE rb_range_new(VALUE, VALUE, int);
30
+ VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
31
+ int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
32
+
33
+ RBIMPL_SYMBOL_EXPORT_END()
34
+
35
+ #endif /* RBIMPL_INTERN_RANGE_H */
@@ -0,0 +1,46 @@
1
+ #ifndef RBIMPL_INTERN_RATIONAL_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_RATIONAL_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_cRational.
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
+ /* rational.c */
30
+ VALUE rb_rational_raw(VALUE, VALUE);
31
+ #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
32
+ #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
33
+ VALUE rb_rational_new(VALUE, VALUE);
34
+ #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
35
+ #define rb_rational_new2(x,y) rb_rational_new((x), (y))
36
+ VALUE rb_Rational(VALUE, VALUE);
37
+ #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
38
+ #define rb_Rational2(x,y) rb_Rational((x), (y))
39
+ VALUE rb_rational_num(VALUE rat);
40
+ VALUE rb_rational_den(VALUE rat);
41
+ VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
42
+ VALUE rb_flt_rationalize(VALUE);
43
+
44
+ RBIMPL_SYMBOL_EXPORT_END()
45
+
46
+ #endif /* RBIMPL_INTERN_RATIONAL_H */
@@ -0,0 +1,50 @@
1
+ #ifndef RBIMPL_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_RE_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_cRegexp.
22
+ */
23
+ #include "ruby/internal/dllexport.h"
24
+ #include "ruby/internal/value.h"
25
+
26
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
27
+
28
+ /* re.c */
29
+ #define rb_memcmp memcmp
30
+ int rb_memcicmp(const void*,const void*,long);
31
+ void rb_match_busy(VALUE);
32
+ VALUE rb_reg_nth_defined(int, VALUE);
33
+ VALUE rb_reg_nth_match(int, VALUE);
34
+ int rb_reg_backref_number(VALUE match, VALUE backref);
35
+ VALUE rb_reg_last_match(VALUE);
36
+ VALUE rb_reg_match_pre(VALUE);
37
+ VALUE rb_reg_match_post(VALUE);
38
+ VALUE rb_reg_match_last(VALUE);
39
+ #define HAVE_RB_REG_NEW_STR 1
40
+ VALUE rb_reg_new_str(VALUE, int);
41
+ VALUE rb_reg_new(const char *, long, int);
42
+ VALUE rb_reg_alloc(void);
43
+ VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
44
+ VALUE rb_reg_match(VALUE, VALUE);
45
+ VALUE rb_reg_match2(VALUE);
46
+ int rb_reg_options(VALUE);
47
+
48
+ RBIMPL_SYMBOL_EXPORT_END()
49
+
50
+ #endif /* RBIMPL_INTERN_RE_H */
@@ -0,0 +1,37 @@
1
+ #ifndef RBIMPL_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_RUBY_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 Process-global APIs.
22
+ */
23
+ #include "ruby/internal/dllexport.h"
24
+ #include "ruby/internal/value.h"
25
+
26
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
27
+
28
+ /* ruby.c */
29
+ #define rb_argv rb_get_argv()
30
+ RUBY_EXTERN VALUE rb_argv0;
31
+ VALUE rb_get_argv(void);
32
+ void *rb_load_file(const char*);
33
+ void *rb_load_file_str(VALUE);
34
+
35
+ RBIMPL_SYMBOL_EXPORT_END()
36
+
37
+ #endif /* RBIMPL_INTERN_RUBY_H */
@@ -0,0 +1,52 @@
1
+ #ifndef RBIMPL_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_SELECT_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 to provide ::rb_fd_select().
22
+ * @note Functions and structs defined in this header file are not
23
+ * necessarily ruby-specific. They don't need ::VALUE etc.
24
+ */
25
+ #include "ruby/internal/config.h"
26
+
27
+ #ifdef HAVE_SYS_TYPES_H
28
+ # include <sys/types.h> /* for NFDBITS (BSD Net/2) */
29
+ #endif
30
+
31
+ #include "ruby/internal/dllexport.h"
32
+
33
+ /* thread.c */
34
+ #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
35
+ # include "ruby/internal/intern/select/largesize.h"
36
+ #elif defined(_WIN32)
37
+ # include "ruby/internal/intern/select/win32.h"
38
+ # define rb_fd_resize(n, f) ((void)(f))
39
+ #else
40
+ # include "ruby/internal/intern/select/posix.h"
41
+ # define rb_fd_resize(n, f) ((void)(f))
42
+ #endif
43
+
44
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
45
+
46
+ struct timeval;
47
+
48
+ int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
49
+
50
+ RBIMPL_SYMBOL_EXPORT_END()
51
+
52
+ #endif /* RBIMPL_INTERN_SELECT_H */
@@ -0,0 +1,103 @@
1
+ #ifndef RBIMPL_INTERN_SELECT_LARGESIZE_H /*-*-C++-*-vi:se ft=cpp:*/
2
+ #define RBIMPL_INTERN_SELECT_LARGESIZE_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 to provide ::rb_fd_select().
22
+ *
23
+ * Several Unix platforms support file descriptors bigger than FD_SETSIZE in
24
+ * `select(2)` system call.
25
+ *
26
+ * - Linux 2.2.12 (?)
27
+ *
28
+ * - NetBSD 1.2 (src/sys/kern/sys_generic.c:1.25)
29
+ * `select(2)` documents how to allocate fd_set dynamically.
30
+ * http://netbsd.gw.com/cgi-bin/man-cgi?select++NetBSD-4.0
31
+ *
32
+ * - FreeBSD 2.2 (src/sys/kern/sys_generic.c:1.19)
33
+ *
34
+ * - OpenBSD 2.0 (src/sys/kern/sys_generic.c:1.4)
35
+ * `select(2)` documents how to allocate fd_set dynamically.
36
+ * http://www.openbsd.org/cgi-bin/man.cgi?query=select&manpath=OpenBSD+4.4
37
+ *
38
+ * - HP-UX documents how to allocate fd_set dynamically.
39
+ * http://docs.hp.com/en/B2355-60105/select.2.html
40
+ *
41
+ * - Solaris 8 has `select_large_fdset`
42
+ *
43
+ * - Mac OS X 10.7 (Lion)
44
+ * `select(2)` returns `EINVAL` if `nfds` is greater than `FD_SET_SIZE` and
45
+ * `_DARWIN_UNLIMITED_SELECT` (or `_DARWIN_C_SOURCE`) isn't defined.
46
+ * http://developer.apple.com/library/mac/#releasenotes/Darwin/SymbolVariantsRelNotes/_index.html
47
+ *
48
+ * When `fd_set` is not big enough to hold big file descriptors, it should be
49
+ * allocated dynamically. Note that this assumes `fd_set` is structured as
50
+ * bitmap.
51
+ *
52
+ * `rb_fd_init` allocates the memory.
53
+ * `rb_fd_term` frees the memory.
54
+ * `rb_fd_set` may re-allocate bitmap.
55
+ *
56
+ * So `rb_fd_set` doesn't reject file descriptors bigger than `FD_SETSIZE`.
57
+ */
58
+ #include "ruby/internal/attr/nonnull.h"
59
+ #include "ruby/internal/attr/pure.h"
60
+ #include "ruby/internal/dllexport.h"
61
+
62
+ /**@cond INTERNAL_MACRO */
63
+ #define rb_fd_ptr rb_fd_ptr
64
+ #define rb_fd_max rb_fd_max
65
+ /** @endcond */
66
+
67
+ struct timeval;
68
+
69
+ typedef struct {
70
+ int maxfd;
71
+ fd_set *fdset;
72
+ } rb_fdset_t;
73
+
74
+ RBIMPL_SYMBOL_EXPORT_BEGIN()
75
+ void rb_fd_init(rb_fdset_t *);
76
+ void rb_fd_term(rb_fdset_t *);
77
+ void rb_fd_zero(rb_fdset_t *);
78
+ void rb_fd_set(int, rb_fdset_t *);
79
+ void rb_fd_clr(int, rb_fdset_t *);
80
+ int rb_fd_isset(int, const rb_fdset_t *);
81
+ void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
82
+ void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
83
+ int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
84
+ RBIMPL_SYMBOL_EXPORT_END()
85
+
86
+ RBIMPL_ATTR_NONNULL(())
87
+ RBIMPL_ATTR_PURE()
88
+ /* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
89
+ static inline fd_set *
90
+ rb_fd_ptr(const rb_fdset_t *f)
91
+ {
92
+ return f->fdset;
93
+ }
94
+
95
+ RBIMPL_ATTR_NONNULL(())
96
+ RBIMPL_ATTR_PURE()
97
+ static inline int
98
+ rb_fd_max(const rb_fdset_t *f)
99
+ {
100
+ return f->maxfd;
101
+ }
102
+
103
+ #endif /* RBIMPL_INTERN_SELECT_LARGESIZE_H */