diff options
Diffstat (limited to 'ruby/src/IceRuby/Operation.cpp')
-rw-r--r-- | ruby/src/IceRuby/Operation.cpp | 22 |
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); } } |