Ruby
3.5.0dev (2025-04-26 revision b1283b45e6246a85ce34be54e5806fb0ca2e3d2d)
internal
cmdlineopt.h
1
#ifndef INTERNAL_CMDLINEOPT_H
/*-*-C-*-vi:se ft=c:*/
2
#define INTERNAL_CMDLINEOPT_H
3
4
#include "yjit.h"
5
6
typedef
struct
{
7
unsigned
int
mask;
8
unsigned
int
set;
9
}
ruby_features_t
;
10
11
typedef
struct
ruby_cmdline_options
{
12
const
char
*script;
13
VALUE
script_name;
14
VALUE
e_script;
15
struct
{
16
struct
{
17
VALUE
name;
18
int
index;
19
} enc;
20
} src, ext, intern;
21
VALUE
req_list;
22
ruby_features_t
features;
23
ruby_features_t
warn;
24
unsigned
int
dump;
25
long
backtrace_length_limit;
26
#if USE_ZJIT
27
void
*zjit;
28
#endif
29
30
const
char
*crash_report;
31
32
signed
int
sflag: 2;
33
unsigned
int
xflag: 1;
34
unsigned
int
warning: 1;
35
unsigned
int
verbose: 1;
36
unsigned
int
do_loop: 1;
37
unsigned
int
do_print: 1;
38
unsigned
int
do_line: 1;
39
unsigned
int
do_split: 1;
40
unsigned
int
do_search: 1;
41
unsigned
int
setids: 2;
42
#if USE_YJIT
43
unsigned
int
yjit: 1;
44
#endif
45
}
ruby_cmdline_options_t
;
46
47
struct
ruby_opt_message
{
48
const
char
*str;
49
unsigned
short
namelen, secondlen;
50
};
51
52
#define RUBY_OPT_MESSAGE(shortopt, longopt, desc) { \
53
shortopt " " longopt " " desc, \
54
(unsigned short)sizeof(shortopt), \
55
(unsigned short)sizeof(longopt), \
56
}
57
58
#define opt_match(s, l, name) \
59
((((l) > rb_strlen_lit(name)) ? (s)[rb_strlen_lit(name)] == '=' : \
60
(l) == rb_strlen_lit(name)) && \
61
memcmp((s), name, rb_strlen_lit(name)) == 0 && \
62
(((s) += rb_strlen_lit(name)), 1))
63
64
#endif
ruby_cmdline_options
Definition
cmdlineopt.h:11
ruby_features_t
Definition
cmdlineopt.h:6
ruby_opt_message
Definition
cmdlineopt.h:47
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition
value.h:40
Generated by
1.9.8