summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-21 19:52:40 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-21 19:52:40 (GMT)
commit4223f00713bec8721c031e50bf8a6d23e806f3e9 (patch)
tree0277c8c7767b4200993d96f4281dc63504464d9e /re.c
parent671c196384908064703362857b2bf5f7f1b6bf39 (diff)
* include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for second
parameter `slot'. You don't need to write a cast (VALUE *) any more. * class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c, vm.c, vm_method.c: remove cast expressions for OBJ_WRITE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/re.c b/re.c
index cd1f997..487bcc1 100644
--- a/re.c
+++ b/re.c
@@ -2438,7 +2438,7 @@ rb_reg_initialize(VALUE obj, const char *s, long len, rb_encoding *enc,
options & ARG_REG_OPTION_MASK, err,
sourcefile, sourceline);
if (!re->ptr) return -1;
- OBJ_WRITE(obj, (VALUE *)&re->src, rb_enc_str_new(s, len, enc));
+ OBJ_WRITE(obj, &re->src, rb_enc_str_new(s, len, enc));
OBJ_FREEZE(re->src);
RB_GC_GUARD(unescaped);
return 0;
@@ -2473,7 +2473,7 @@ rb_reg_s_alloc(VALUE klass)
NEWOBJ_OF(re, struct RRegexp, klass, T_REGEXP | (RGENGC_WB_PROTECTED_REGEXP ? FL_WB_PROTECTED : 0));
re->ptr = 0;
- OBJ_WRITE(re, (VALUE *)&re->src, 0);
+ OBJ_WRITE(re, &re->src, 0);
re->usecnt = 0;
return (VALUE)re;