zscan 2.0.8 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- 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,47 @@
|
|
1
|
+
#ifndef RBIMPL_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERN_STRUCT_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_cStruct.
|
22
|
+
*/
|
23
|
+
#include "ruby/internal/dllexport.h"
|
24
|
+
#include "ruby/internal/intern/vm.h" /* rb_alloc_func_t */
|
25
|
+
#include "ruby/internal/value.h"
|
26
|
+
|
27
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
28
|
+
|
29
|
+
/* struct.c */
|
30
|
+
VALUE rb_struct_new(VALUE, ...);
|
31
|
+
VALUE rb_struct_define(const char*, ...);
|
32
|
+
VALUE rb_struct_define_under(VALUE, const char*, ...);
|
33
|
+
VALUE rb_struct_alloc(VALUE, VALUE);
|
34
|
+
VALUE rb_struct_initialize(VALUE, VALUE);
|
35
|
+
VALUE rb_struct_aref(VALUE, VALUE);
|
36
|
+
VALUE rb_struct_aset(VALUE, VALUE, VALUE);
|
37
|
+
VALUE rb_struct_getmember(VALUE, ID);
|
38
|
+
VALUE rb_struct_s_members(VALUE);
|
39
|
+
VALUE rb_struct_members(VALUE);
|
40
|
+
VALUE rb_struct_size(VALUE s);
|
41
|
+
VALUE rb_struct_alloc_noinit(VALUE);
|
42
|
+
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
|
43
|
+
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
|
44
|
+
|
45
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
46
|
+
|
47
|
+
#endif /* RBIMPL_INTERN_STRUCT_H */
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#ifndef RBIMPL_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERN_THREAD_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_cThread.
|
22
|
+
*/
|
23
|
+
#include "ruby/internal/config.h"
|
24
|
+
#include "ruby/internal/cast.h"
|
25
|
+
#include "ruby/internal/dllexport.h"
|
26
|
+
#include "ruby/internal/value.h"
|
27
|
+
|
28
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
29
|
+
|
30
|
+
struct timeval;
|
31
|
+
|
32
|
+
/* thread.c */
|
33
|
+
void rb_thread_schedule(void);
|
34
|
+
void rb_thread_wait_fd(int);
|
35
|
+
int rb_thread_fd_writable(int);
|
36
|
+
void rb_thread_fd_close(int);
|
37
|
+
int rb_thread_alone(void);
|
38
|
+
void rb_thread_sleep(int);
|
39
|
+
void rb_thread_sleep_forever(void);
|
40
|
+
void rb_thread_sleep_deadly(void);
|
41
|
+
VALUE rb_thread_stop(void);
|
42
|
+
VALUE rb_thread_wakeup(VALUE);
|
43
|
+
VALUE rb_thread_wakeup_alive(VALUE);
|
44
|
+
VALUE rb_thread_run(VALUE);
|
45
|
+
VALUE rb_thread_kill(VALUE);
|
46
|
+
VALUE rb_thread_create(VALUE (*)(void *), void*);
|
47
|
+
void rb_thread_wait_for(struct timeval);
|
48
|
+
VALUE rb_thread_current(void);
|
49
|
+
VALUE rb_thread_main(void);
|
50
|
+
VALUE rb_thread_local_aref(VALUE, ID);
|
51
|
+
VALUE rb_thread_local_aset(VALUE, ID, VALUE);
|
52
|
+
void rb_thread_atfork(void);
|
53
|
+
void rb_thread_atfork_before_exec(void);
|
54
|
+
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
|
55
|
+
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
|
56
|
+
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
|
57
|
+
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
|
58
|
+
|
59
|
+
typedef void rb_unblock_function_t(void *);
|
60
|
+
typedef VALUE rb_blocking_function_t(void *);
|
61
|
+
void rb_thread_check_ints(void);
|
62
|
+
int rb_thread_interrupted(VALUE thval);
|
63
|
+
|
64
|
+
#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
|
65
|
+
#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
|
66
|
+
VALUE rb_mutex_new(void);
|
67
|
+
VALUE rb_mutex_locked_p(VALUE mutex);
|
68
|
+
VALUE rb_mutex_trylock(VALUE mutex);
|
69
|
+
VALUE rb_mutex_lock(VALUE mutex);
|
70
|
+
VALUE rb_mutex_unlock(VALUE mutex);
|
71
|
+
VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
|
72
|
+
VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
|
73
|
+
|
74
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
75
|
+
|
76
|
+
#endif /* RBIMPL_INTERN_THREAD_H */
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#ifndef RBIMPL_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERN_TIME_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_cTime.
|
22
|
+
*/
|
23
|
+
#include "ruby/internal/config.h"
|
24
|
+
|
25
|
+
#ifdef HAVE_TIME_H
|
26
|
+
# include <time.h> /* for time_t */
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#include "ruby/internal/dllexport.h"
|
30
|
+
#include "ruby/internal/value.h"
|
31
|
+
|
32
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
33
|
+
|
34
|
+
struct timespec;
|
35
|
+
struct timeval;
|
36
|
+
|
37
|
+
/* time.c */
|
38
|
+
void rb_timespec_now(struct timespec *);
|
39
|
+
VALUE rb_time_new(time_t, long);
|
40
|
+
VALUE rb_time_nano_new(time_t, long);
|
41
|
+
VALUE rb_time_timespec_new(const struct timespec *, int);
|
42
|
+
VALUE rb_time_num_new(VALUE, VALUE);
|
43
|
+
struct timeval rb_time_interval(VALUE num);
|
44
|
+
struct timeval rb_time_timeval(VALUE time);
|
45
|
+
struct timespec rb_time_timespec(VALUE time);
|
46
|
+
struct timespec rb_time_timespec_interval(VALUE num);
|
47
|
+
VALUE rb_time_utc_offset(VALUE time);
|
48
|
+
VALUE rb_time_succ(VALUE);
|
49
|
+
|
50
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
51
|
+
|
52
|
+
#endif /* RBIMPL_INTERN_TIME_H */
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#ifndef RBIMPL_INTERN_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERN_VARIABLE_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 names inside of a Ruby program.
|
22
|
+
*/
|
23
|
+
#include "ruby/internal/attr/noreturn.h"
|
24
|
+
#include "ruby/internal/dllexport.h"
|
25
|
+
#include "ruby/internal/value.h"
|
26
|
+
#include "ruby/st.h"
|
27
|
+
|
28
|
+
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
29
|
+
|
30
|
+
/* variable.c */
|
31
|
+
VALUE rb_mod_name(VALUE);
|
32
|
+
VALUE rb_class_path(VALUE);
|
33
|
+
VALUE rb_class_path_cached(VALUE);
|
34
|
+
void rb_set_class_path(VALUE, VALUE, const char*);
|
35
|
+
void rb_set_class_path_string(VALUE, VALUE, VALUE);
|
36
|
+
VALUE rb_path_to_class(VALUE);
|
37
|
+
VALUE rb_path2class(const char*);
|
38
|
+
VALUE rb_class_name(VALUE);
|
39
|
+
VALUE rb_autoload_load(VALUE, ID);
|
40
|
+
VALUE rb_autoload_p(VALUE, ID);
|
41
|
+
VALUE rb_f_trace_var(int, const VALUE*);
|
42
|
+
VALUE rb_f_untrace_var(int, const VALUE*);
|
43
|
+
VALUE rb_f_global_variables(void);
|
44
|
+
void rb_alias_variable(ID, ID);
|
45
|
+
void rb_copy_generic_ivar(VALUE,VALUE);
|
46
|
+
void rb_free_generic_ivar(VALUE);
|
47
|
+
VALUE rb_ivar_get(VALUE, ID);
|
48
|
+
VALUE rb_ivar_set(VALUE, ID, VALUE);
|
49
|
+
VALUE rb_ivar_defined(VALUE, ID);
|
50
|
+
void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
|
51
|
+
st_index_t rb_ivar_count(VALUE);
|
52
|
+
VALUE rb_attr_get(VALUE, ID);
|
53
|
+
VALUE rb_obj_instance_variables(VALUE);
|
54
|
+
VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
|
55
|
+
void *rb_mod_const_at(VALUE, void*);
|
56
|
+
void *rb_mod_const_of(VALUE, void*);
|
57
|
+
VALUE rb_const_list(void*);
|
58
|
+
VALUE rb_mod_constants(int, const VALUE *, VALUE);
|
59
|
+
VALUE rb_mod_remove_const(VALUE, VALUE);
|
60
|
+
int rb_const_defined(VALUE, ID);
|
61
|
+
int rb_const_defined_at(VALUE, ID);
|
62
|
+
int rb_const_defined_from(VALUE, ID);
|
63
|
+
VALUE rb_const_get(VALUE, ID);
|
64
|
+
VALUE rb_const_get_at(VALUE, ID);
|
65
|
+
VALUE rb_const_get_from(VALUE, ID);
|
66
|
+
void rb_const_set(VALUE, ID, VALUE);
|
67
|
+
VALUE rb_const_remove(VALUE, ID);
|
68
|
+
#if 0 /* EXPERIMENTAL: remove if no problem */
|
69
|
+
RBIMPL_ATTR_NORETURN()
|
70
|
+
VALUE rb_mod_const_missing(VALUE,VALUE);
|
71
|
+
#endif
|
72
|
+
VALUE rb_cvar_defined(VALUE, ID);
|
73
|
+
void rb_cvar_set(VALUE, ID, VALUE);
|
74
|
+
VALUE rb_cvar_get(VALUE, ID);
|
75
|
+
void rb_cv_set(VALUE, const char*, VALUE);
|
76
|
+
VALUE rb_cv_get(VALUE, const char*);
|
77
|
+
void rb_define_class_variable(VALUE, const char*, VALUE);
|
78
|
+
VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
|
79
|
+
VALUE rb_mod_remove_cvar(VALUE, VALUE);
|
80
|
+
|
81
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
82
|
+
|
83
|
+
#endif /* RBIMPL_INTERN_VARIABLE_H */
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERN_VM_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_cRubyVM.
|
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
|
+
/* vm.c */
|
30
|
+
int rb_sourceline(void);
|
31
|
+
const char *rb_sourcefile(void);
|
32
|
+
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
|
33
|
+
|
34
|
+
/* vm_eval.c */
|
35
|
+
VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
|
36
|
+
VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
|
37
|
+
void rb_remove_method(VALUE, const char*);
|
38
|
+
void rb_remove_method_id(VALUE, ID);
|
39
|
+
|
40
|
+
VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
|
41
|
+
VALUE rb_apply(VALUE, ID, VALUE);
|
42
|
+
|
43
|
+
VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
|
44
|
+
VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
|
45
|
+
VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
|
46
|
+
VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
|
47
|
+
|
48
|
+
/* vm_method.c */
|
49
|
+
#define HAVE_RB_DEFINE_ALLOC_FUNC 1
|
50
|
+
typedef VALUE (*rb_alloc_func_t)(VALUE);
|
51
|
+
void rb_define_alloc_func(VALUE, rb_alloc_func_t);
|
52
|
+
void rb_undef_alloc_func(VALUE);
|
53
|
+
rb_alloc_func_t rb_get_alloc_func(VALUE);
|
54
|
+
void rb_clear_constant_cache(void);
|
55
|
+
void rb_clear_method_cache_by_class(VALUE);
|
56
|
+
void rb_alias(VALUE, ID, ID);
|
57
|
+
void rb_attr(VALUE,ID,int,int,int);
|
58
|
+
int rb_method_boundp(VALUE, ID, int);
|
59
|
+
int rb_method_basic_definition_p(VALUE, ID);
|
60
|
+
|
61
|
+
int rb_obj_respond_to(VALUE, ID, int);
|
62
|
+
int rb_respond_to(VALUE, ID);
|
63
|
+
|
64
|
+
RBIMPL_ATTR_NORETURN()
|
65
|
+
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
|
66
|
+
#if !defined(RUBY_EXPORT) && defined(_WIN32)
|
67
|
+
RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker);
|
68
|
+
#define rb_f_notimplement (*rb_f_notimplement_)
|
69
|
+
#endif
|
70
|
+
|
71
|
+
/* vm_backtrace.c */
|
72
|
+
void rb_backtrace(void);
|
73
|
+
VALUE rb_make_backtrace(void);
|
74
|
+
|
75
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
76
|
+
|
77
|
+
#endif /* RBIMPL_INTERN_VM_H */
|
@@ -0,0 +1,94 @@
|
|
1
|
+
#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_INTERPRETER_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 Interpreter embedding APIs.
|
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
|
+
/**
|
30
|
+
* @defgroup embed CRuby Embedding APIs
|
31
|
+
* CRuby interpreter APIs. These are APIs to embed MRI interpreter into your
|
32
|
+
* program.
|
33
|
+
* These functions are not a part of Ruby extension library API.
|
34
|
+
* Extension libraries of Ruby should not depend on these functions.
|
35
|
+
* @{
|
36
|
+
*/
|
37
|
+
|
38
|
+
/** @defgroup ruby1 ruby(1) implementation
|
39
|
+
* A part of the implementation of ruby(1) command.
|
40
|
+
* Other programs that embed Ruby interpreter do not always need to use these
|
41
|
+
* functions.
|
42
|
+
* @{
|
43
|
+
*/
|
44
|
+
|
45
|
+
void ruby_sysinit(int *argc, char ***argv);
|
46
|
+
void ruby_init(void);
|
47
|
+
void* ruby_options(int argc, char** argv);
|
48
|
+
int ruby_executable_node(void *n, int *status);
|
49
|
+
int ruby_run_node(void *n);
|
50
|
+
|
51
|
+
/* version.c */
|
52
|
+
void ruby_show_version(void);
|
53
|
+
#ifndef ruby_show_copyright
|
54
|
+
void ruby_show_copyright(void);
|
55
|
+
#endif
|
56
|
+
|
57
|
+
/*! A convenience macro to call ruby_init_stack(). Must be placed just after
|
58
|
+
* variable declarations */
|
59
|
+
#define RUBY_INIT_STACK \
|
60
|
+
VALUE variable_in_this_stack_frame; \
|
61
|
+
ruby_init_stack(&variable_in_this_stack_frame);
|
62
|
+
/*! @} */
|
63
|
+
|
64
|
+
void ruby_init_stack(volatile VALUE*);
|
65
|
+
|
66
|
+
int ruby_setup(void);
|
67
|
+
int ruby_cleanup(volatile int);
|
68
|
+
|
69
|
+
void ruby_finalize(void);
|
70
|
+
|
71
|
+
RBIMPL_ATTR_NORETURN()
|
72
|
+
void ruby_stop(int);
|
73
|
+
|
74
|
+
void ruby_set_stack_size(size_t);
|
75
|
+
int ruby_stack_check(void);
|
76
|
+
size_t ruby_stack_length(VALUE**);
|
77
|
+
|
78
|
+
int ruby_exec_node(void *n);
|
79
|
+
|
80
|
+
void ruby_script(const char* name);
|
81
|
+
void ruby_set_script_name(VALUE name);
|
82
|
+
|
83
|
+
void ruby_prog_init(void);
|
84
|
+
void ruby_set_argv(int, char**);
|
85
|
+
void *ruby_process_options(int, char**);
|
86
|
+
void ruby_init_loadpath(void);
|
87
|
+
void ruby_incpush(const char*);
|
88
|
+
void ruby_sig_finalize(void);
|
89
|
+
|
90
|
+
/*! @} */
|
91
|
+
|
92
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
93
|
+
|
94
|
+
#endif /* RBIMPL_INTERPRETER_H */
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#ifndef RBIMPL_ITERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
|
2
|
+
#define RBIMPL_ITERATOR_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 Block related APIs.
|
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
|
+
#define RB_BLOCK_CALL_FUNC_STRICT 1
|
30
|
+
#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
|
31
|
+
#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \
|
32
|
+
VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
|
33
|
+
typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg));
|
34
|
+
typedef rb_block_call_func *rb_block_call_func_t;
|
35
|
+
|
36
|
+
VALUE rb_each(VALUE);
|
37
|
+
VALUE rb_yield(VALUE);
|
38
|
+
VALUE rb_yield_values(int n, ...);
|
39
|
+
VALUE rb_yield_values2(int n, const VALUE *argv);
|
40
|
+
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
|
41
|
+
VALUE rb_yield_splat(VALUE);
|
42
|
+
VALUE rb_yield_splat_kw(VALUE, int);
|
43
|
+
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */
|
44
|
+
int rb_keyword_given_p(void);
|
45
|
+
int rb_block_given_p(void);
|
46
|
+
void rb_need_block(void);
|
47
|
+
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
|
48
|
+
VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
|
49
|
+
VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
|
50
|
+
VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
|
51
|
+
VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
|
52
|
+
VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
|
53
|
+
VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
|
54
|
+
VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
|
55
|
+
VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
|
56
|
+
|
57
|
+
RBIMPL_ATTR_NORETURN()
|
58
|
+
void rb_throw(const char*,VALUE);
|
59
|
+
|
60
|
+
RBIMPL_ATTR_NORETURN()
|
61
|
+
void rb_throw_obj(VALUE,VALUE);
|
62
|
+
|
63
|
+
RBIMPL_SYMBOL_EXPORT_END()
|
64
|
+
|
65
|
+
#endif /* RBIMPL_ITERATOR_H */
|