diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-10-26 18:19:36 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-10-26 18:19:36 +0000 |
commit | 96dc3dac6b8a22f9dfaef728a84db652eda8f3dd (patch) | |
tree | c8f745d592202eafba256d2a36282aa6d8cd25b8 /rb/src/IceRuby/Communicator.cpp | |
parent | Fix typo (diff) | |
download | ice-96dc3dac6b8a22f9dfaef728a84db652eda8f3dd.tar.bz2 ice-96dc3dac6b8a22f9dfaef728a84db652eda8f3dd.tar.xz ice-96dc3dac6b8a22f9dfaef728a84db652eda8f3dd.zip |
declaring local VALUEs to be volatile; fixing bug 1496 in createArray
Diffstat (limited to 'rb/src/IceRuby/Communicator.cpp')
-rw-r--r-- | rb/src/IceRuby/Communicator.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/rb/src/IceRuby/Communicator.cpp b/rb/src/IceRuby/Communicator.cpp index 074a8f74e1b..4e98c6ec315 100644 --- a/rb/src/IceRuby/Communicator.cpp +++ b/rb/src/IceRuby/Communicator.cpp @@ -52,8 +52,8 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self) { ICE_RUBY_TRY { - VALUE initDataCls = callRuby(rb_path2class, "Ice::InitializationData"); - VALUE args = Qnil, initData = Qnil; + volatile VALUE initDataCls = callRuby(rb_path2class, "Ice::InitializationData"); + volatile VALUE args = Qnil, initData = Qnil; if(argc == 1) { if(isArray(argv[0])) @@ -97,9 +97,9 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self) Ice::InitializationData data; if(!NIL_P(initData)) { - VALUE properties = callRuby(rb_iv_get, initData, "@properties"); - VALUE logger = callRuby(rb_iv_get, initData, "@logger"); - VALUE defaultContext = callRuby(rb_iv_get, initData, "@defaultContext"); + volatile VALUE properties = callRuby(rb_iv_get, initData, "@properties"); + volatile VALUE logger = callRuby(rb_iv_get, initData, "@logger"); + volatile VALUE defaultContext = callRuby(rb_iv_get, initData, "@defaultContext"); if(!NIL_P(properties)) { @@ -121,7 +121,7 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self) // Insert the program name (stored in the Ruby global variable $0) as the first // element of the sequence. // - VALUE progName = callRuby(rb_gv_get, "$0"); + volatile VALUE progName = callRuby(rb_gv_get, "$0"); seq.insert(seq.begin(), getString(progName)); data.properties = Ice::createProperties(seq, data.properties); @@ -183,7 +183,7 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self) // for(i = 1; i < ac; ++i) { - VALUE str = createString(av[i]); + volatile VALUE str = createString(av[i]); callRuby(rb_ary_push, args, str); } } @@ -197,15 +197,15 @@ IceRuby_initialize(int argc, VALUE* argv, VALUE self) ObjectFactoryPtr factory = new ObjectFactory; communicator->addObjectFactory(factory, ""); - VALUE result = Data_Wrap_Struct(_communicatorClass, IceRuby_Communicator_mark, IceRuby_Communicator_free, - new Ice::CommunicatorPtr(communicator)); + VALUE result = Data_Wrap_Struct(_communicatorClass, IceRuby_Communicator_mark, + IceRuby_Communicator_free, new Ice::CommunicatorPtr(communicator)); CommunicatorMap::iterator p = _communicatorMap.find(communicator); if(p != _communicatorMap.end()) { _communicatorMap.erase(p); } - _communicatorMap.insert(CommunicatorMap::value_type(communicator, result)); + _communicatorMap.insert(CommunicatorMap::value_type(communicator, reinterpret_cast<const VALUE&>(result))); return result; } @@ -391,7 +391,7 @@ IceRuby_Communicator_getDefaultRouter(VALUE self) Ice::RouterPrx router = p->getDefaultRouter(); if(router) { - VALUE cls = callRuby(rb_path2class, "Ice::RouterPrx"); + volatile VALUE cls = callRuby(rb_path2class, "Ice::RouterPrx"); assert(!NIL_P(cls)); return createProxy(router, cls); } @@ -432,7 +432,7 @@ IceRuby_Communicator_getDefaultLocator(VALUE self) Ice::LocatorPrx locator = p->getDefaultLocator(); if(locator) { - VALUE cls = callRuby(rb_path2class, "Ice::LocatorPrx"); + volatile VALUE cls = callRuby(rb_path2class, "Ice::LocatorPrx"); assert(!NIL_P(cls)); return createProxy(locator, cls); } |