summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_event.c
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-07 10:24:56 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-10-07 10:24:56 +0000
commit5dd01af28fab4f7442251fa93d1a686f3a6d82ee (patch)
treebedcb304d07c2e56041c4d62ca1963b1b5f70040 /ext/win32ole/win32ole_event.c
parent6b35c34c6808f24f6ac8f03d99620a6406676b0e (diff)
ext/win32ole/*.c, ext/win32ole/win32ole.h: use RB_INT2FIX instead of
INT2FIX, and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/win32ole_event.c')
-rw-r--r--ext/win32ole/win32ole_event.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 577333b..6de31cb 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -342,19 +342,19 @@ ole_val2ptr_variant(VALUE val, VARIANT *var)
case T_FIXNUM:
switch(V_VT(var)) {
case (VT_UI1 | VT_BYREF) :
- *V_UI1REF(var) = NUM2CHR(val);
+ *V_UI1REF(var) = RB_NUM2CHR(val);
break;
case (VT_I2 | VT_BYREF) :
- *V_I2REF(var) = (short)NUM2INT(val);
+ *V_I2REF(var) = (short)RB_NUM2INT(val);
break;
case (VT_I4 | VT_BYREF) :
- *V_I4REF(var) = NUM2INT(val);
+ *V_I4REF(var) = RB_NUM2INT(val);
break;
case (VT_R4 | VT_BYREF) :
- *V_R4REF(var) = (float)NUM2INT(val);
+ *V_R4REF(var) = (float)RB_NUM2INT(val);
break;
case (VT_R8 | VT_BYREF) :
- *V_R8REF(var) = NUM2INT(val);
+ *V_R8REF(var) = RB_NUM2INT(val);
break;
default:
break;
@@ -363,10 +363,10 @@ ole_val2ptr_variant(VALUE val, VARIANT *var)
case T_FLOAT:
switch(V_VT(var)) {
case (VT_I2 | VT_BYREF) :
- *V_I2REF(var) = (short)NUM2INT(val);
+ *V_I2REF(var) = (short)RB_NUM2INT(val);
break;
case (VT_I4 | VT_BYREF) :
- *V_I4REF(var) = NUM2INT(val);
+ *V_I4REF(var) = RB_NUM2INT(val);
break;
case (VT_R4 | VT_BYREF) :
*V_R4REF(var) = (float)NUM2DBL(val);
@@ -417,7 +417,7 @@ hash2ptr_dispparams(VALUE hash, ITypeInfo *pTypeInfo, DISPID dispid, DISPPARAMS
for (i = 0; i < len - 1; i++) {
key = WC2VSTR(bstrs[i + 1]);
- val = rb_hash_aref(hash, INT2FIX(i));
+ val = rb_hash_aref(hash, RB_UINT2NUM(i));
if (val == Qnil)
val = rb_hash_aref(hash, key);
if (val == Qnil)