mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
RARRAY_PTR() because there is no new reference. * compile.c (iseq_set_exception_table): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6398f79853
commit
714428154d
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Wed Jul 24 20:57:44 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
|
||||||
|
RARRAY_PTR() because there is no new reference.
|
||||||
|
|
||||||
|
* compile.c (iseq_set_exception_table): ditto.
|
||||||
|
|
||||||
Wed Jul 24 19:49:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
Wed Jul 24 19:49:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
|
* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
|
||||||
|
|
|
@ -1169,7 +1169,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
|
||||||
|
|
||||||
iseq->arg_opts = i;
|
iseq->arg_opts = i;
|
||||||
iseq->arg_opt_table = ALLOC_N(VALUE, i);
|
iseq->arg_opt_table = ALLOC_N(VALUE, i);
|
||||||
MEMCPY(iseq->arg_opt_table, RARRAY_PTR(labels), VALUE, i);
|
MEMCPY(iseq->arg_opt_table, RARRAY_RAWPTR(labels), VALUE, i);
|
||||||
for (j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
iseq->arg_opt_table[j] &= ~1;
|
iseq->arg_opt_table[j] &= ~1;
|
||||||
}
|
}
|
||||||
|
@ -1665,18 +1665,18 @@ label_get_sp(LABEL *lobj)
|
||||||
static int
|
static int
|
||||||
iseq_set_exception_table(rb_iseq_t *iseq)
|
iseq_set_exception_table(rb_iseq_t *iseq)
|
||||||
{
|
{
|
||||||
VALUE *tptr, *ptr;
|
const VALUE *tptr, *ptr;
|
||||||
int tlen, i;
|
int tlen, i;
|
||||||
struct iseq_catch_table_entry *entry;
|
struct iseq_catch_table_entry *entry;
|
||||||
|
|
||||||
tlen = (int)RARRAY_LEN(iseq->compile_data->catch_table_ary);
|
tlen = (int)RARRAY_LEN(iseq->compile_data->catch_table_ary);
|
||||||
tptr = RARRAY_PTR(iseq->compile_data->catch_table_ary);
|
tptr = RARRAY_RAWPTR(iseq->compile_data->catch_table_ary);
|
||||||
|
|
||||||
iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
|
iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
|
||||||
iseq->catch_table_size = tlen;
|
iseq->catch_table_size = tlen;
|
||||||
|
|
||||||
for (i = 0; i < tlen; i++) {
|
for (i = 0; i < tlen; i++) {
|
||||||
ptr = RARRAY_PTR(tptr[i]);
|
ptr = RARRAY_RAWPTR(tptr[i]);
|
||||||
entry = &iseq->catch_table[i];
|
entry = &iseq->catch_table[i];
|
||||||
entry->type = (enum catch_type)(ptr[0] & 0xffff);
|
entry->type = (enum catch_type)(ptr[0] & 0xffff);
|
||||||
entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
|
entry->start = label_get_position((LABEL *)(ptr[1] & ~1));
|
||||||
|
|
Loading…
Reference in a new issue