summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Proxy.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-02-01 23:59:06 +0000
committerMark Spruiell <mes@zeroc.com>2007-02-01 23:59:06 +0000
commiteb48f174b6f526cef560dbc27dbb847f8b7c70f0 (patch)
tree08f1130846f005acd6c1cba543c1caebfcde9946 /rb/src/IceRuby/Proxy.cpp
parentbug 1740 (diff)
downloadice-eb48f174b6f526cef560dbc27dbb847f8b7c70f0.tar.bz2
ice-eb48f174b6f526cef560dbc27dbb847f8b7c70f0.tar.xz
ice-eb48f174b6f526cef560dbc27dbb847f8b7c70f0.zip
bug fix for array handling
Diffstat (limited to 'rb/src/IceRuby/Proxy.cpp')
-rw-r--r--rb/src/IceRuby/Proxy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rb/src/IceRuby/Proxy.cpp b/rb/src/IceRuby/Proxy.cpp
index e96683559dc..adcadfe49d7 100644
--- a/rb/src/IceRuby/Proxy.cpp
+++ b/rb/src/IceRuby/Proxy.cpp
@@ -318,8 +318,8 @@ IceRuby_ObjectPrx_ice_ids(int argc, VALUE* argv, VALUE self)
for(vector<string>::iterator q = ids.begin(); q != ids.end(); ++q, ++i)
{
RARRAY(result)->ptr[i] = createString(*q);
+ RARRAY(result)->len++; // Increment len for each new element to prevent premature GC.
}
- RARRAY(result)->len = static_cast<long>(ids.size());
return result;
}
@@ -496,8 +496,8 @@ IceRuby_ObjectPrx_ice_getEndpoints(VALUE self)
for(Ice::EndpointSeq::iterator q = seq.begin(); q != seq.end(); ++q, ++i)
{
RARRAY(result)->ptr[i] = createEndpoint(seq[i]);
+ RARRAY(result)->len++; // Increment len for each new element to prevent premature GC.
}
- RARRAY(result)->len = static_cast<long>(seq.size());
return result;
}
ICE_RUBY_CATCH