* compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
* compile.c (iseq_build_from_ary_body): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eb86296497
commit
ce89a1c081
@ -1,3 +1,9 @@
|
|||||||
|
Fri Nov 8 10:58:02 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
|
* compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
|
||||||
|
|
||||||
|
* compile.c (iseq_build_from_ary_body): ditto.
|
||||||
|
|
||||||
Fri Nov 8 10:49:34 2013 Masaki Matsushita <glass.saga@gmail.com>
|
Fri Nov 8 10:49:34 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
* enumerator.c (append_method): use RARRAY_CONST_PTR().
|
* enumerator.c (append_method): use RARRAY_CONST_PTR().
|
||||||
|
@ -5578,7 +5578,8 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<RARRAY_LEN(exception); i++) {
|
for (i=0; i<RARRAY_LEN(exception); i++) {
|
||||||
VALUE v, type, *ptr, eiseqval;
|
VALUE v, type, eiseqval;
|
||||||
|
const VALUE *ptr;
|
||||||
LABEL *lstart, *lend, *lcont;
|
LABEL *lstart, *lend, *lcont;
|
||||||
int sp;
|
int sp;
|
||||||
|
|
||||||
@ -5587,7 +5588,7 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
|
|||||||
if (RARRAY_LEN(v) != 6) {
|
if (RARRAY_LEN(v) != 6) {
|
||||||
rb_raise(rb_eSyntaxError, "wrong exception entry");
|
rb_raise(rb_eSyntaxError, "wrong exception entry");
|
||||||
}
|
}
|
||||||
ptr = RARRAY_PTR(v);
|
ptr = RARRAY_CONST_PTR(v);
|
||||||
type = get_exception_sym2type(ptr[0]);
|
type = get_exception_sym2type(ptr[0]);
|
||||||
if (ptr[1] == Qnil) {
|
if (ptr[1] == Qnil) {
|
||||||
eiseqval = 0;
|
eiseqval = 0;
|
||||||
@ -5644,7 +5645,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
|
|||||||
VALUE body, struct st_table *labels_table)
|
VALUE body, struct st_table *labels_table)
|
||||||
{
|
{
|
||||||
/* TODO: body should be frozen */
|
/* TODO: body should be frozen */
|
||||||
VALUE *ptr = RARRAY_PTR(body);
|
const VALUE *ptr = RARRAY_CONST_PTR(body);
|
||||||
long i, len = RARRAY_LEN(body);
|
long i, len = RARRAY_LEN(body);
|
||||||
int j;
|
int j;
|
||||||
int line_no = 0;
|
int line_no = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user