aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 14:35:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 14:35:40 +0000
commit17c48bebf87828abeb5be91ed8ba0a2b72bc5479 (patch)
treefc36e1142112ab169e7da74c8e1f0e6b29bdea7b
parent3c24bea4b5bfa33b3dddde688638cc2892f9512c (diff)
downloadruby-17c48bebf87828abeb5be91ed8ba0a2b72bc5479.tar.gz
* compile.c (iseq_build_body), insns.def (getglobal, setglobal),
iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename): use VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--compile.c6
-rw-r--r--insns.def4
-rw-r--r--iseq.c4
-rw-r--r--util.c2
5 files changed, 13 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index e6c5b83a8d..cf19dfb8e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-Tue Oct 12 23:09:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 12 23:35:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * compile.c (iseq_build_body), insns.def (getglobal, setglobal),
+ iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename):
+ use VALUE.
* gc.c (obj_free, rb_objspace_call_finalizer): fix truncating
cast.
diff --git a/compile.c b/compile.c
index 6501565c00..d73e669769 100644
--- a/compile.c
+++ b/compile.c
@@ -5268,7 +5268,7 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
"unknown instruction: %s", RSTRING_PTR(insn));
}
- if (argc != insn_len(insn_id)-1) {
+ if (argc != insn_len((VALUE)insn_id)-1) {
rb_compile_error(RSTRING_PTR(iseq->filename), line_no,
"operand size mismatch");
}
@@ -5277,7 +5277,7 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
argv = compile_data_alloc(iseq, sizeof(VALUE) * argc);
for (j=0; j<argc; j++) {
VALUE op = rb_ary_entry(obj, j+1);
- switch (insn_op_type(insn_id, j)) {
+ switch (insn_op_type((VALUE)insn_id, j)) {
case TS_OFFSET: {
LABEL *label = register_label(iseq, labels_table, op);
argv[j] = (VALUE)label;
@@ -5341,7 +5341,7 @@ iseq_build_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
}
break;
default:
- rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type(insn_id, j));
+ rb_raise(rb_eSyntaxError, "unknown operand: %c", insn_op_type((VALUE)insn_id, j));
}
}
}
diff --git a/insns.def b/insns.def
index 3d5eeeb97b..62d0df40a1 100644
--- a/insns.def
+++ b/insns.def
@@ -258,7 +258,7 @@ getglobal
()
(VALUE val)
{
- val = GET_GLOBAL(entry);
+ val = GET_GLOBAL((VALUE)entry);
}
/**
@@ -272,7 +272,7 @@ setglobal
(VALUE val)
()
{
- SET_GLOBAL(entry, val);
+ SET_GLOBAL((VALUE)entry, val);
}
diff --git a/iseq.c b/iseq.c
index d7c8fb3f03..2bdac2b199 100644
--- a/iseq.c
+++ b/iseq.c
@@ -512,7 +512,7 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt)
make_compile_option(&option, opt);
prepare_iseq_build(iseq, name, filename, filepath, line_no,
- parent, iseq_type, 0, &option);
+ parent, (VALUE)iseq_type, 0, &option);
rb_iseq_build_from_ary(iseq, locals, args, exception, body);
@@ -1307,7 +1307,7 @@ iseq_data_to_ary(rb_iseq_t *iseq)
VALUE label;
if (st_lookup(labels_table, pos, &label)) {
- rb_ary_push(body, label);
+ rb_ary_push(body, (VALUE)label);
}
if (iseq->insn_info_table[i].line_no != line) {
diff --git a/util.c b/util.c
index 94396a3991..6cd2d2049e 100644
--- a/util.c
+++ b/util.c
@@ -373,7 +373,7 @@ valid_filename(const char *s)
#define D ((int*)d)
#define mmprepare(base, size) do {\
- if (((long)base & (0x3)) == 0)\
+ if (((VALUE)base & (0x3)) == 0)\
if (size >= 16) mmkind = 1;\
else mmkind = 0;\
else mmkind = -1;\