Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
re.h File Reference
`#include <sys/types.h>`
`#include <stdio.h>`
`#include "ruby/regex.h"`
Include dependency graph for re.h:
This graph shows which files directly or indirectly include this file:

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 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)

## Macro Definition Documentation

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

Definition at line 53 of file re.h.

Referenced by match_aref(), match_array(), match_backref_number(), match_begin(), match_check(), match_end(), match_equal(), match_hash(), match_init_copy(), match_inspect(), match_names(), match_offset(), match_regexp(), match_string(), match_to_s(), memsize_of(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_match(), rb_reg_search(), and update_char_offset().

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

Definition at line 54 of file re.h.

Referenced by match_aref(), match_array(), match_backref_number(), match_begin(), match_end(), match_equal(), match_hash(), match_init_copy(), match_inspect(), match_offset(), match_size(), match_values_at(), rb_reg_match_last(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_defined(), rb_reg_nth_match(), rb_reg_search(), rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat_set(), scan_once(), and str_gsub().

## Typedef Documentation

typedef struct re_pattern_buffer Regexp

Definition at line 31 of file re.h.

## Function Documentation

void rb_match_busy | ( | VALUE |  | ) |

Definition at line 1189 of file re.c.

References FL_SET, and MATCH_BUSY.

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

Definition at line 1321 of file re.c.

References enc, onigenc_get_right_adjust_char_head(), ONIGENC_LEFT_ADJUST_CHAR_HEAD, ONIGENC_MBC_MAXLEN, p, range, rb_reg_prepare_enc(), RSTRING_LEN, RSTRING_PTR, and UChar.

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

Definition at line 1282 of file re.c.

References einfo, re_pattern_buffer::enc, enc, err, onig_new(), OnigDefaultSyntax, re_pattern_buffer::options, Qnil, r, rb_eArgError, RB_GC_GUARD, rb_raise(), rb_reg_check(), rb_reg_prepare_enc(), rb_reg_preprocess(), rb_reg_raise(), RREGEXP, RREGEXP_SRC_LEN, RREGEXP_SRC_PTR, RSTRING_LEN, RSTRING_PTR, and UChar.

Referenced by rb_reg_search(), and strscan_do_scan().

VALUE rb_reg_quote | ( | VALUE |  | ) |

Definition at line 2965 of file re.c.

References c, enc, mbclen, memcpy(), OBJ_INFECT, rb_enc_ascget(), rb_enc_associate(), rb_enc_copy(), rb_enc_get(), rb_enc_mbcput, rb_enc_str_asciionly_p(), rb_str_new(), rb_str_new3, rb_str_resize(), rb_usascii_encoding(), RSTRING_LEN, RSTRING_PTR, s, t, and tmp.

Referenced by get_pat(), and rb_reg_s_quote().

VALUE rb_reg_regcomp | ( | VALUE |  | ) |

Definition at line 2547 of file re.c.

References ENCODING_GET, memcmp(), rb_reg_new_str(), reg_cache, RREGEXP_SRC_LEN, RREGEXP_SRC_PTR, RSTRING_LEN, RSTRING_PTR, and str.

Referenced by get_pat(), and rb_str_split_m().

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

Definition at line 3286 of file re.c.

References ASCGET, BEG, c, e, END, mbclen, name, name_to_backref_number(), re_registers::num_regs, onig_noname_group_capture_is_active(), p, ptr, rb_enc_asciicompat, rb_enc_get(), rb_enc_str_buf_cat(), rb_eRuntimeError, rb_raise(), rb_str_buf_new(), RREGEXP, RSTRING_LEN, RSTRING_PTR, s, str, str_enc, and val.

Referenced by rb_str_sub_bang(), and str_gsub().

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

Definition at line 1352 of file re.c.

References err, FL_TAINT, FL_TEST, FL_UNSET, match(), match_alloc(), MATCH_BUSY, MEMZERO, NIL_P(), OBJ_INFECT, OBJ_TAINT, onig_free(), ONIG_MISMATCH, ONIG_OPTION_NONE, onig_region_copy(), onig_region_free(), onig_search(), ptr, Qnil, range, rb_backref_get(), rb_backref_set(), rb_reg_prepare_re(), rb_reg_raise(), rb_safe_level, rb_str_new4, result, RMATCH, RMATCH_REGS, RREGEXP, RREGEXP_SRC_LEN, RREGEXP_SRC_PTR, RSTRING_LEN, RSTRING_PTR, and UChar.

Referenced by rb_reg_eqq(), rb_reg_match2(), rb_str_index_m(), rb_str_partition(), rb_str_rindex_m(), rb_str_rpartition(), rb_str_scan(), rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat(), rb_str_subpat_set(), reg_match_pos(), scan_once(), and str_gsub().