Ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5ad0e4688e963d9de019557c78feed9)
re.h
Go to the documentation of this file.
1/**********************************************************************
2
3 re.h -
4
5 $Author$
6 created at: Thu Sep 30 14:18:32 JST 1993
7
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
9
10**********************************************************************/
11
12#ifndef RUBY_RE_H
13#define RUBY_RE_H 1
14
15#if defined(__cplusplus)
16extern "C" {
17#if 0
18} /* satisfy cc-mode */
19#endif
20#endif
21
22#include <sys/types.h>
23#include <stdio.h>
24
25#include "ruby/regex.h"
26
28
30
32 long beg;
33 long end;
34};
35
36struct rmatch {
38
41};
42
43struct RMatch {
44 struct RBasic basic;
46 struct rmatch *rmatch;
47 VALUE regexp; /* RRegexp */
48};
49
50#define RMATCH(obj) (R_CAST(RMatch)(obj))
51#define RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)
52
54long rb_reg_search(VALUE, VALUE, long, int);
56long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
60int rb_reg_region_copy(struct re_registers *, const struct re_registers *);
61
63
64#if defined(__cplusplus)
65#if 0
66{ /* satisfy cc-mode */
67#endif
68} /* extern "C" { */
69#endif
70
71#endif /* RUBY_RE_H */
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
#define RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_END
typedefRUBY_SYMBOL_EXPORT_BEGIN struct re_pattern_buffer Regexp
Definition: re.h:29
int rb_reg_region_copy(struct re_registers *, const struct re_registers *)
Definition: re.c:946
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Definition: re.c:1499
void rb_match_busy(VALUE)
Definition: re.c:1295
VALUE rb_reg_regcomp(VALUE)
Definition: re.c:2970
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE)
Definition: re.c:3776
long rb_reg_adjust_startpos(VALUE, VALUE, long, int)
Definition: re.c:1506
VALUE rb_reg_quote(VALUE)
Definition: re.c:3462
long rb_reg_search(VALUE, VALUE, long, int)
Definition: re.c:1620
unsigned long VALUE
Definition: ruby.h:102
Definition: re.h:43
VALUE regexp
Definition: re.h:47
struct rmatch * rmatch
Definition: re.h:46
struct RBasic basic
Definition: re.h:44
VALUE str
Definition: re.h:45
long beg
Definition: re.h:32
long end
Definition: re.h:33
Definition: re.h:36
int char_offset_num_allocated
Definition: re.h:40
struct rmatch_offset * char_offset
Definition: re.h:39
struct re_registers regs
Definition: re.h:37