Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Data Structures | Macros | Typedefs | Functions
re.h File Reference
`#include <sys/types.h>`
`#include <stdio.h>`
`#include "ruby/regex.h"`

Go to the source code of this file.

## Data Structures
struct | rmatch_offset
struct | rmatch
struct | RMatch

## Macros
#define | RMATCH(obj) (R_CAST(RMatch)(obj))
#define | RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)

## Typedefs
typedef typedefRUBY_SYMBOL_EXPORT_BEGIN struct re_pattern_buffer | Regexp

## Functions
VALUE | rb_reg_regcomp (VALUE)
long | rb_reg_search (VALUE, VALUE, long, int)
VALUE | rb_reg_regsub (VALUE, VALUE, struct re_registers *, VALUE)
long | rb_reg_adjust_startpos (VALUE, VALUE, long, int)
void | rb_match_busy (VALUE)
VALUE | rb_reg_quote (VALUE)
regex_t * | rb_reg_prepare_re (VALUE re, VALUE str)
int | rb_reg_region_copy (struct re_registers *, const struct re_registers *)

## Macro Definition Documentation

## ◆ RMATCH

#define RMATCH | ( |  | obj | ) | (R_CAST(RMatch)(obj))

Definition at line 50 of file re.h.

## ◆ RMATCH_REGS

#define RMATCH_REGS | ( |  | obj | ) | (&(R_CAST(RMatch)(obj))->rmatch->regs)

Definition at line 51 of file re.h.

## Typedef Documentation

## ◆ Regexp

typedef typedefRUBY_SYMBOL_EXPORT_BEGIN struct re_pattern_buffer Regexp

Definition at line 29 of file re.h.

## Function Documentation

## ◆ rb_match_busy()

void rb_match_busy | ( | VALUE |  | ) |

Definition at line 1287 of file re.c.

## ◆ rb_reg_adjust_startpos()

long rb_reg_adjust_startpos | ( | VALUE | ,
|  | VALUE | ,
|  | long | ,
|  | int |
| ) |  |

Definition at line 1498 of file re.c.

References range, rb_encoding, and UChar.

## ◆ rb_reg_prepare_re()

regex_t* rb_reg_prepare_re | ( | VALUE | re,
|  | VALUE | str
| ) |  |

Definition at line 1491 of file re.c.

References err, rb_reg_prepare_re0(), and str.

## ◆ rb_reg_quote()

VALUE rb_reg_quote | ( | VALUE |  | ) |

Definition at line 3461 of file re.c.

References mbclen, memcpy(), n, rb_enc_ascget(), rb_enc_associate(), rb_enc_copy(), rb_enc_get(), rb_enc_mbcput, rb_enc_str_asciionly_p(), rb_encoding, rb_str_new, rb_str_new3, rb_str_resize(), rb_usascii_encoding(), RSTRING_LEN, RSTRING_PTR, and str.

## ◆ rb_reg_regcomp()

VALUE rb_reg_regcomp | ( | VALUE |  | ) |

Definition at line 2969 of file re.c.

## ◆ rb_reg_region_copy()

int rb_reg_region_copy | ( | struct re_registers * | ,
|  | const struct re_registers * |
| ) |  |

Definition at line 946 of file re.c.

References re_registers::allocated, onig_region_copy(), ONIGERR_MEMORY, and rb_gc().

## ◆ rb_reg_regsub()

VALUE rb_reg_regsub | ( | VALUE | ,
|  | VALUE | ,
|  | struct re_registers * | ,
|  | VALUE |
| ) |  |

Definition at line 3775 of file re.c.

References ASCGET, mbclen, n, name, NAME_TO_NUMBER, NIL_P, onig_noname_group_capture_is_active(), rb_enc_asciicompat, rb_enc_get(), rb_enc_str_buf_cat(), rb_encoding, rb_str_buf_new(), rb_str_subseq(), RREGEXP_PTR, RSTRING_LEN, RSTRING_PTR, src, and str.

## ◆ rb_reg_search()

long rb_reg_search | ( | VALUE | ,
|  | VALUE | ,
|  | long | ,
|  | int |
| ) |  |

Definition at line 1612 of file re.c.

References rb_reg_search0(), and str.

Referenced by rb_reg_match2().