summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-10 00:34:24 (GMT)
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-10 00:34:24 (GMT)
commitaf0d504f2df2d6b63ee8ce433216f294c21eb2c4 (patch)
tree43e299f577c1f1f64b65a0582b136f21622ce969 /iseq.c
parent5901e8fb83cc181479c1fcf32142c072c0d282cd (diff)
Fix warning: cast from pointer to integer of different size
``` .../ruby/iseq.c: In function ‘rb_vm_insn_null_translator’: .../ruby/iseq.c:137:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (int)addr; ^ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iseq.c b/iseq.c
index 9253fd1..52e6d7e 100644
--- a/iseq.c
+++ b/iseq.c
@@ -116,10 +116,10 @@ rb_iseq_free(const rb_iseq_t *iseq)
}
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
-static int
+static VALUE
rb_vm_insn_addr2insn2(const void *addr)
{
- int insn;
+ VALUE insn;
const void * const *table = rb_vm_get_insns_address_table();
for (insn = 0; insn < VM_INSTRUCTION_SIZE; insn++) {
@@ -131,14 +131,14 @@ rb_vm_insn_addr2insn2(const void *addr)
}
#endif
-static int
+static VALUE
rb_vm_insn_null_translator(const void *addr)
{
- return (int)addr;
+ return (VALUE)addr;
}
typedef void iseq_value_itr_t(void *ctx, VALUE obj);
-typedef int rb_vm_insns_translator_t(const void *addr);
+typedef VALUE rb_vm_insns_translator_t(const void *addr);
static int
iseq_extract_values(const VALUE *code, size_t pos, iseq_value_itr_t * func, void *data, rb_vm_insns_translator_t * translator)