Ruby
3.5.0dev (2025-02-20 revision 34098b669c0cbc024cd08e686891f1dfe0a10aaf)
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
27
const
char
*crash_report;
28
29
signed
int
sflag: 2;
30
unsigned
int
xflag: 1;
31
unsigned
int
warning: 1;
32
unsigned
int
verbose: 1;
33
unsigned
int
do_loop: 1;
34
unsigned
int
do_print: 1;
35
unsigned
int
do_line: 1;
36
unsigned
int
do_split: 1;
37
unsigned
int
do_search: 1;
38
unsigned
int
setids: 2;
39
#if USE_YJIT
40
unsigned
int
yjit: 1;
41
#endif
42
}
ruby_cmdline_options_t
;
43
44
struct
ruby_opt_message
{
45
const
char
*str;
46
unsigned
short
namelen, secondlen;
47
};
48
49
#define RUBY_OPT_MESSAGE(shortopt, longopt, desc) { \
50
shortopt " " longopt " " desc, \
51
(unsigned short)sizeof(shortopt), \
52
(unsigned short)sizeof(longopt), \
53
}
54
55
#define opt_match(s, l, name) \
56
((((l) > rb_strlen_lit(name)) ? (s)[rb_strlen_lit(name)] == '=' : \
57
(l) == rb_strlen_lit(name)) && \
58
memcmp((s), name, rb_strlen_lit(name)) == 0 && \
59
(((s) += rb_strlen_lit(name)), 1))
60
61
#endif
ruby_cmdline_options
Definition
cmdlineopt.h:11
ruby_features_t
Definition
cmdlineopt.h:6
ruby_opt_message
Definition
cmdlineopt.h:44
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition
value.h:40
Generated by
1.9.8