mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ea7158919f
commit
195992f032
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Dec 27 18:27:13 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* re.c: parenthesize macro arguments.
|
||||
|
||||
Mon Dec 27 15:22:23 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/README.win32: note to need NT based OS to build ruby.
|
||||
|
|
6
re.c
6
re.c
|
@ -21,8 +21,8 @@ VALUE rb_eRegexpError;
|
|||
typedef char onig_errmsg_buffer[ONIG_MAX_ERROR_MESSAGE_LEN];
|
||||
#define errcpy(err, msg) strlcpy((err), (msg), ONIG_MAX_ERROR_MESSAGE_LEN)
|
||||
|
||||
#define BEG(no) regs->beg[no]
|
||||
#define END(no) regs->end[no]
|
||||
#define BEG(no) (regs->beg[(no)])
|
||||
#define END(no) (regs->end[(no)])
|
||||
|
||||
#if 'a' == 97 /* it's ascii */
|
||||
static const char casetable[] = {
|
||||
|
@ -3282,7 +3282,7 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
|
|||
rb_encoding *str_enc = rb_enc_get(str);
|
||||
rb_encoding *src_enc = rb_enc_get(src);
|
||||
int acompat = rb_enc_asciicompat(str_enc);
|
||||
#define ASCGET(s,e,cl) (acompat ? (*cl=1,ISASCII(s[0])?s[0]:-1) : rb_enc_ascget(s, e, cl, str_enc))
|
||||
#define ASCGET(s,e,cl) (acompat ? (*(cl)=1,ISASCII((s)[0])?(s)[0]:-1) : rb_enc_ascget((s), (e), (cl), str_enc))
|
||||
|
||||
p = s = RSTRING_PTR(str);
|
||||
e = s + RSTRING_LEN(str);
|
||||
|
|
Loading…
Add table
Reference in a new issue