summaryrefslogtreecommitdiff
path: root/ruby/src/IceRuby/Operation.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2016-03-16 11:37:46 -0700
committerMark Spruiell <mes@zeroc.com>2016-03-16 12:16:05 -0700
commit2470db9ad5f6a96374b1ba1b2ac67ab08f5c90c6 (patch)
tree8febbfd4e00c761f0b2d1c03e07e039445c411ed /ruby/src/IceRuby/Operation.cpp
parentUpdate version to 3.7.0 in some md files (diff)
downloadice-2470db9ad5f6a96374b1ba1b2ac67ab08f5c90c6.tar.bz2
ice-2470db9ad5f6a96374b1ba1b2ac67ab08f5c90c6.tar.xz
ice-2470db9ad5f6a96374b1ba1b2ac67ab08f5c90c6.zip
ICE-7023 - Ruby 2.3 compatibility
Diffstat (limited to 'ruby/src/IceRuby/Operation.cpp')
-rw-r--r--ruby/src/IceRuby/Operation.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/ruby/src/IceRuby/Operation.cpp b/ruby/src/IceRuby/Operation.cpp
index 55de1f69c0e..d683d5d7f63 100644
--- a/ruby/src/IceRuby/Operation.cpp
+++ b/ruby/src/IceRuby/Operation.cpp
@@ -166,7 +166,7 @@ IceRuby::ParamInfo::unmarshaled(VALUE val, VALUE target, void* closure)
#else
long i = reinterpret_cast<long>(closure);
#endif
- RARRAY_PTR(target)[i] = val;
+ RARRAY_ASET(target, i, val);
}
//
@@ -278,7 +278,7 @@ IceRuby::OperationI::OperationI(VALUE name, VALUE mode, VALUE sendMode, VALUE am
//
for(long i = 0; i < RARRAY_LEN(exceptions); ++i)
{
- _exceptions.push_back(getException(RARRAY_PTR(exceptions)[i]));
+ _exceptions.push_back(getException(RARRAY_AREF(exceptions, i)));
}
}
@@ -350,7 +350,7 @@ IceRuby::OperationI::invoke(const Ice::ObjectPrx& proxy, VALUE args, VALUE hctx)
}
else
{
- return RARRAY_PTR(results)[0];
+ return RARRAY_AREF(results, 0);
}
}
}
@@ -378,7 +378,7 @@ IceRuby::OperationI::convertParams(VALUE v, ParamInfoList& params, int posOffset
for(long i = 0; i < RARRAY_LEN(v); ++i)
{
- ParamInfoPtr param = convertParam(RARRAY_PTR(v)[i], i + posOffset);
+ ParamInfoPtr param = convertParam(RARRAY_AREF(v, i), i + posOffset);
params.push_back(param);
if(!param->optional && !usesClasses)
{
@@ -392,9 +392,9 @@ IceRuby::OperationI::convertParam(VALUE v, int pos)
{
assert(TYPE(v) == T_ARRAY);
ParamInfoPtr param = new ParamInfo;
- param->type = getType(RARRAY_PTR(v)[0]);
- param->optional = static_cast<bool>(RTEST(RARRAY_PTR(v)[1]));
- param->tag = static_cast<int>(getInteger(RARRAY_PTR(v)[2]));
+ param->type = getType(RARRAY_AREF(v, 0));
+ param->optional = static_cast<bool>(RTEST(RARRAY_AREF(v, 1)));
+ param->tag = static_cast<int>(getInteger(RARRAY_AREF(v, 2)));
param->pos = pos;
return param;
}
@@ -432,7 +432,7 @@ IceRuby::OperationI::prepareRequest(const Ice::ObjectPrx& proxy, VALUE args, Ice
for(p = _inParams.begin(); p != _inParams.end(); ++p)
{
ParamInfoPtr info = *p;
- volatile VALUE arg = RARRAY_PTR(args)[info->pos];
+ volatile VALUE arg = RARRAY_AREF(args, info->pos);
if((!info->optional || arg != Unset) && !info->type->validate(arg))
{
string opName = fixIdent(_name, IdentNormal);
@@ -449,7 +449,7 @@ IceRuby::OperationI::prepareRequest(const Ice::ObjectPrx& proxy, VALUE args, Ice
ParamInfoPtr info = *p;
if(!info->optional)
{
- volatile VALUE arg = RARRAY_PTR(args)[info->pos];
+ volatile VALUE arg = RARRAY_AREF(args, info->pos);
info->type->marshal(arg, os, &objectMap, false);
}
}
@@ -460,7 +460,7 @@ IceRuby::OperationI::prepareRequest(const Ice::ObjectPrx& proxy, VALUE args, Ice
for(p = _optionalInParams.begin(); p != _optionalInParams.end(); ++p)
{
ParamInfoPtr info = *p;
- volatile VALUE arg = RARRAY_PTR(args)[info->pos];
+ volatile VALUE arg = RARRAY_AREF(args, info->pos);
if(arg != Unset && os->writeOptional(info->tag, info->type->optionalFormat()))
{
info->type->marshal(arg, os, &objectMap, true);
@@ -543,7 +543,7 @@ IceRuby::OperationI::unmarshalResults(const vector<Ice::Byte>& bytes, const Ice:
}
else
{
- RARRAY_PTR(results)[info->pos] = Unset;
+ RARRAY_ASET(results, info->pos, Unset);
}
}