summaryrefslogtreecommitdiff
path: root/iseq.h
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-10 00:33:11 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-10 00:33:11 +0000
commit5901e8fb83cc181479c1fcf32142c072c0d282cd (patch)
tree3ab20fe35f9af1a82f4fe785a35e6f4c3f3c153f /iseq.h
parentff43e24374fadd8f20dd6c63e0f8447dc6c560a9 (diff)
Fix error: implicit conversion loses integer precision
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906 ``` iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] int cnt = iseq->body->variable.flip_count; ~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.h')
-rw-r--r--iseq.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/iseq.h b/iseq.h
index a39d827..0a0edd9 100644
--- a/iseq.h
+++ b/iseq.h
@@ -35,10 +35,10 @@ rb_call_info_kw_arg_bytes(int keyword_len)
#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
-static inline int
+static inline rb_snum_t
ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
{
- int cnt = iseq->body->variable.flip_count;
+ rb_snum_t cnt = iseq->body->variable.flip_count;
iseq->body->variable.flip_count += 1;
return cnt;
}