diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-01-08 20:38:05 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-01-08 20:38:05 +0000 |
commit | b55f1538e4a42e78de77929627c9efa2e3a15315 (patch) | |
tree | 03908e07e81539cbdde71b3d98570ec4b98679f6 | |
parent | Updated copyright header (diff) | |
download | ice-b55f1538e4a42e78de77929627c9efa2e3a15315.tar.bz2 ice-b55f1538e4a42e78de77929627c9efa2e3a15315.tar.xz ice-b55f1538e4a42e78de77929627c9efa2e3a15315.zip |
fixes for bugs 1536, 1652
-rw-r--r-- | rb/CHANGES | 7 | ||||
-rw-r--r-- | rb/src/IceRuby/.depend | 22 | ||||
-rw-r--r-- | rb/src/IceRuby/Communicator.cpp | 2 | ||||
-rw-r--r-- | rb/src/IceRuby/Logger.cpp | 19 | ||||
-rw-r--r-- | rb/src/IceRuby/Operation.cpp | 10 |
5 files changed, 43 insertions, 17 deletions
diff --git a/rb/CHANGES b/rb/CHANGES index f83a57095a4..2abc98f532b 100644 --- a/rb/CHANGES +++ b/rb/CHANGES @@ -3,6 +3,13 @@ NOTE: Please keep changes in the appropriate section for HEAD or 3.1. Changes since version 3.1.1 (HEAD) --------------------------- +- Fixed a code-generation bug that occurred when the name of a + data member begins with an uppercase letter. + +- Added Ice::getProcessLogger(). + +- Added Communicator::isShutdown(). + - Added Communicator::propertyToProxy() which creates a proxy from a set of properties. This function allows you to set various local proxy settings, such as the Locator cache timeout, which cannot be diff --git a/rb/src/IceRuby/.depend b/rb/src/IceRuby/.depend index 2e237c3fbfd..7f3fffbee74 100644 --- a/rb/src/IceRuby/.depend +++ b/rb/src/IceRuby/.depend @@ -1,11 +1,11 @@ -Communicator$(OBJEXT): Communicator.cpp Communicator.h Config.h ImplicitContext.h Logger.h ObjectFactory.h Properties.h Proxy.h Util.h -Init$(OBJEXT): Init.cpp Communicator.h Config.h ImplicitContext.h Logger.h Operation.h Properties.h Proxy.h Slice.h Types.h Util.h -ImplicitContext$(OBJEXT): ImplicitContext.cpp ImplicitContext.h Config.h Util.h -Logger$(OBJEXT): Logger.cpp Logger.h Config.h Util.h -ObjectFactory$(OBJEXT): ObjectFactory.cpp ObjectFactory.h Config.h Types.h Util.h -Operation$(OBJEXT): Operation.cpp Operation.h Config.h Proxy.h Types.h Util.h -Properties$(OBJEXT): Properties.cpp Properties.h Config.h Util.h -Proxy$(OBJEXT): Proxy.cpp Proxy.h Config.h Communicator.h Util.h -Slice$(OBJEXT): Slice.cpp Slice.h Config.h Util.h -Types$(OBJEXT): Types.cpp Types.h Config.h Util.h Proxy.h -Util$(OBJEXT): Util.cpp Util.h Config.h +Communicator$(OBJEXT): Communicator.cpp ./Communicator.h ./Config.h ./ImplicitContext.h ./Logger.h ./ObjectFactory.h ./Properties.h ./Proxy.h ./Util.h +Init$(OBJEXT): Init.cpp ./Communicator.h ./Config.h ./ImplicitContext.h ./Logger.h ./Operation.h ./Properties.h ./Proxy.h ./Slice.h ./Types.h ./Util.h +ImplicitContext$(OBJEXT): ImplicitContext.cpp ./ImplicitContext.h ./Config.h ./Util.h +Logger$(OBJEXT): Logger.cpp ./Logger.h ./Config.h ./Util.h +ObjectFactory$(OBJEXT): ObjectFactory.cpp ./ObjectFactory.h ./Config.h ./Types.h ./Util.h +Operation$(OBJEXT): Operation.cpp ./Operation.h ./Config.h ./Proxy.h ./Types.h ./Util.h +Properties$(OBJEXT): Properties.cpp ./Properties.h ./Config.h ./Util.h +Proxy$(OBJEXT): Proxy.cpp ./Proxy.h ./Config.h ./Communicator.h ./Util.h +Slice$(OBJEXT): Slice.cpp ./Slice.h ./Config.h ./Util.h +Types$(OBJEXT): Types.cpp ./Types.h ./Config.h ./Util.h ./Proxy.h +Util$(OBJEXT): Util.cpp ./Util.h ./Config.h diff --git a/rb/src/IceRuby/Communicator.cpp b/rb/src/IceRuby/Communicator.cpp index 07ab706da24..9902f7a7b1a 100644 --- a/rb/src/IceRuby/Communicator.cpp +++ b/rb/src/IceRuby/Communicator.cpp @@ -241,7 +241,7 @@ IceRuby_Communicator_isShutdown(VALUE self) ICE_RUBY_TRY { Ice::CommunicatorPtr p = getCommunicator(self); - p->isShutdown(); + return p->isShutdown() ? Qtrue : Qfalse; } ICE_RUBY_CATCH return Qnil; diff --git a/rb/src/IceRuby/Logger.cpp b/rb/src/IceRuby/Logger.cpp index 1ae2b717d91..516bc0988b9 100644 --- a/rb/src/IceRuby/Logger.cpp +++ b/rb/src/IceRuby/Logger.cpp @@ -9,6 +9,7 @@ #include <Logger.h> #include <Util.h> +#include <Ice/Initialize.h> using namespace std; using namespace IceRuby; @@ -94,6 +95,19 @@ IceRuby_Logger_error(VALUE self, VALUE message) return Qnil; } +extern "C" +VALUE +IceRuby_getProcessLogger() +{ + ICE_RUBY_TRY + { + Ice::LoggerPtr logger = Ice::getProcessLogger(); + return createLogger(logger); + } + ICE_RUBY_CATCH + return Qnil; +} + bool IceRuby::initLogger(VALUE iceModule) { @@ -110,5 +124,10 @@ IceRuby::initLogger(VALUE iceModule) rb_define_method(_loggerClass, "warning", CAST_METHOD(IceRuby_Logger_warning), 1); rb_define_method(_loggerClass, "error", CAST_METHOD(IceRuby_Logger_error), 1); + // + // Global methods. + // + rb_define_module_function(iceModule, "getProcessLogger", CAST_METHOD(IceRuby_getProcessLogger), 0); + return true; } diff --git a/rb/src/IceRuby/Operation.cpp b/rb/src/IceRuby/Operation.cpp index 9939e4a3007..3494c0d6376 100644 --- a/rb/src/IceRuby/Operation.cpp +++ b/rb/src/IceRuby/Operation.cpp @@ -149,11 +149,11 @@ IceRuby::OperationI::OperationI(VALUE name, VALUE mode, VALUE sendMode, VALUE am _amd = amd == Qtrue; if(_amd) { - _dispatchName = fixIdent(_name, false) + "_async"; + _dispatchName = fixIdent(_name, IdentNormal) + "_async"; } else { - _dispatchName = fixIdent(_name, false); + _dispatchName = fixIdent(_name, IdentNormal); } // @@ -323,7 +323,7 @@ IceRuby::OperationI::prepareRequest(const Ice::CommunicatorPtr& communicator, VA long paramCount = static_cast<long>(_inParams.size()); if(argc != paramCount) { - string fixedName = fixIdent(_name, false); + string fixedName = fixIdent(_name, IdentNormal); throw RubyException(rb_eArgError, "%s expects %ld in parameters", fixedName.c_str(), paramCount); } @@ -344,11 +344,11 @@ IceRuby::OperationI::prepareRequest(const Ice::CommunicatorPtr& communicator, VA string opName; if(async) { - opName = fixIdent(_name, false) + "_async"; + opName = fixIdent(_name, IdentNormal) + "_async"; } else { - opName = fixIdent(_name, false); + opName = fixIdent(_name, IdentNormal); } throw RubyException(rb_eTypeError, "invalid value for argument %ld in operation `%s'", async ? i + 2 : i + 1, opName.c_str()); |