summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES25
-rw-r--r--cs/src/Ice/Util.cs10
-rwxr-xr-xfixVersion.py8
-rw-r--r--java/src/Ice/Util.java12
-rw-r--r--java/src/IceUtil/Version.java4
-rw-r--r--php/src/IcePHP/Profile.cpp12
-rw-r--r--php/src/IcePHP/Profile.h6
-rw-r--r--py/modules/IcePy/Init.cpp6
-rw-r--r--py/modules/IcePy/Util.cpp9
-rw-r--r--py/modules/IcePy/Util.h3
-rw-r--r--py/python/Ice.py3
-rw-r--r--rb/src/IceRuby/Util.cpp17
12 files changed, 105 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 22cc7fceb15..bcd36305453 100644
--- a/CHANGES
+++ b/CHANGES
@@ -23,6 +23,11 @@ Changes since version 3.3b
Java Changes
============
+- Deprecated the class IceUtil.Version.
+
+- Added the methods stringVersion and intVersion to Ice.Util for
+ obtaining the Ice version.
+
- Fixed a NullPointerException thrown when allocating an InputStream
with an empty buffer.
@@ -33,6 +38,9 @@ Java Changes
C# Changes
==========
+- Added the methods stringVersion and intVersion to Ice.Util for
+ obtaining the Ice version.
+
- Fixed a NullReferenceException thrown when allocating an InputStream
with an empty buffer.
@@ -50,6 +58,23 @@ PHP Changes
- A null value is now allowed where a sequence or dictionary value is
expected.
+- Replaced the Ice_version method with Ice_stringVersion, and added
+ Ice_intVersion.
+
+
+Python Changes
+==============
+
+- Replaced the Ice.version method with Ice.stringVersion, and added
+ Ice.intVersion.
+
+
+Ruby Changes
+============
+
+- Replaced the Ice::version method with Ice::stringVersion, and added
+ Ice::intVersion.
+
======================================================================
Changes since version 3.2.1
diff --git a/cs/src/Ice/Util.cs b/cs/src/Ice/Util.cs
index d0fa0f9282d..3b72e378f11 100644
--- a/cs/src/Ice/Util.cs
+++ b/cs/src/Ice/Util.cs
@@ -301,6 +301,16 @@ namespace Ice
}
}
+ public static string stringVersion()
+ {
+ return "3.3.0"; // "A.B.C", with A=major, B=minor, C=patch
+ }
+
+ public static int intVersion()
+ {
+ return 30300; // AABBCC, with AA=major, BB=minor, CC=patch
+ }
+
private static object _processLoggerMutex = new object();
private static Logger _processLogger = null;
}
diff --git a/fixVersion.py b/fixVersion.py
index 2d501e0cdd8..7dc5ba5ff9f 100755
--- a/fixVersion.py
+++ b/fixVersion.py
@@ -298,6 +298,10 @@ if not patchIceE:
[("ICE_STRING_VERSION = \"" + vpatMatch +"\"", version), \
("ICE_INT_VERSION = ([0-9]*)", intVersion(version))])
+ fileMatchAndReplace(os.path.join(icej_home, "src", "Ice", "Util.java"),
+ [("return \"" + vpatMatch +"\".*A=major", version), \
+ ("return ([0-9]*).*AA=major", intVersion(version))])
+
fileMatchAndReplace(os.path.join(icej_home, "demo", "IceStorm", "clock", "config.icebox"),
[("IceStormService,([0-9]+b?)", soVersion(version))])
@@ -327,6 +331,10 @@ if not patchIceE:
majorVersion(version) + "." + minorVersion(version) + "." + patchVersion(version))],
False) # Disable warnings as many files might not have SSL configuration
+ fileMatchAndReplace(os.path.join(icecs_home, "src", "Ice", "Util.cs"),
+ [("return \"" + vpatMatch +"\".*A=major", version), \
+ ("return ([0-9]*).*AA=major", intVersion(version))])
+
#
# Fix version in VB sources
diff --git a/java/src/Ice/Util.java b/java/src/Ice/Util.java
index 096f3aea71d..a2c19671ec6 100644
--- a/java/src/Ice/Util.java
+++ b/java/src/Ice/Util.java
@@ -340,6 +340,18 @@ public final class Util
}
}
+ public static String
+ stringVersion()
+ {
+ return "3.3.0"; // "A.B.C", with A=major, B=minor, C=patch
+ }
+
+ public static int
+ intVersion()
+ {
+ return 30300; // AABBCC, with AA=major, BB=minor, CC=patch
+ }
+
private static String _localAddress = null;
private static java.lang.Object _processLoggerMutex = new java.lang.Object();
private static Logger _processLogger = null;
diff --git a/java/src/IceUtil/Version.java b/java/src/IceUtil/Version.java
index 269e06918b6..7a52646b0f6 100644
--- a/java/src/IceUtil/Version.java
+++ b/java/src/IceUtil/Version.java
@@ -9,6 +9,10 @@
package IceUtil;
+/**
+ * @deprecated IceUtil.Version is deprecated, use Ice.Util.stringVersion() or
+ * Ice.Util.intVersion() instead.
+ **/
public final class Version
{
//
diff --git a/php/src/IcePHP/Profile.cpp b/php/src/IcePHP/Profile.cpp
index f2ba707aa70..b1d7cf87a38 100644
--- a/php/src/IcePHP/Profile.cpp
+++ b/php/src/IcePHP/Profile.cpp
@@ -835,7 +835,7 @@ do_load(const string& name, const Ice::StringSeq& args TSRMLS_DC)
return true;
}
-ZEND_FUNCTION(Ice_version)
+ZEND_FUNCTION(Ice_stringVersion)
{
if(ZEND_NUM_ARGS() != 0)
{
@@ -846,6 +846,16 @@ ZEND_FUNCTION(Ice_version)
RETURN_STRINGL(const_cast<char*>(s.c_str()), s.length(), 1);
}
+ZEND_FUNCTION(Ice_intVersion)
+{
+ if(ZEND_NUM_ARGS() != 0)
+ {
+ WRONG_PARAM_COUNT;
+ }
+
+ RETURN_LONG(ICE_INT_VERSION);
+}
+
ZEND_FUNCTION(Ice_loadProfile)
{
if(ZEND_NUM_ARGS() > 1)
diff --git a/php/src/IcePHP/Profile.h b/php/src/IcePHP/Profile.h
index 59f4a72abe2..85f7f170b6a 100644
--- a/php/src/IcePHP/Profile.h
+++ b/php/src/IcePHP/Profile.h
@@ -17,14 +17,16 @@
//
extern "C"
{
-ZEND_FUNCTION(Ice_version);
+ZEND_FUNCTION(Ice_stringVersion);
+ZEND_FUNCTION(Ice_intVersion);
ZEND_FUNCTION(Ice_loadProfile);
ZEND_FUNCTION(Ice_loadProfileWithArgs);
ZEND_FUNCTION(Ice_dumpProfile);
}
#define ICE_PHP_PROFILE_FUNCTIONS \
- ZEND_FE(Ice_version, NULL) \
+ ZEND_FE(Ice_stringVersion, NULL) \
+ ZEND_FE(Ice_intVersion, NULL) \
ZEND_FE(Ice_loadProfile, NULL) \
ZEND_FE(Ice_loadProfileWithArgs, NULL) \
ZEND_FE(Ice_dumpProfile, NULL)
diff --git a/py/modules/IcePy/Init.cpp b/py/modules/IcePy/Init.cpp
index c2af30bb693..78578402fe5 100644
--- a/py/modules/IcePy/Init.cpp
+++ b/py/modules/IcePy/Init.cpp
@@ -29,8 +29,10 @@ extern "C" PyObject* Ice_registerTypes(PyObject*, PyObject*);
static PyMethodDef methods[] =
{
- { STRCAST("version"), reinterpret_cast<PyCFunction>(IcePy_version), METH_NOARGS,
- PyDoc_STR(STRCAST("version() -> string")) },
+ { STRCAST("stringVersion"), reinterpret_cast<PyCFunction>(IcePy_stringVersion), METH_NOARGS,
+ PyDoc_STR(STRCAST("stringVersion() -> string")) },
+ { STRCAST("intVersion"), reinterpret_cast<PyCFunction>(IcePy_intVersion), METH_NOARGS,
+ PyDoc_STR(STRCAST("intVersion() -> int")) },
{ STRCAST("generateUUID"), reinterpret_cast<PyCFunction>(IcePy_generateUUID), METH_NOARGS,
PyDoc_STR(STRCAST("generateUUID() -> string")) },
{ STRCAST("createProperties"), reinterpret_cast<PyCFunction>(IcePy_createProperties), METH_VARARGS,
diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp
index fffbd8002bc..5c9cf1f17d9 100644
--- a/py/modules/IcePy/Util.cpp
+++ b/py/modules/IcePy/Util.cpp
@@ -876,7 +876,7 @@ IcePy::getIdentity(PyObject* p, Ice::Identity& ident)
extern "C"
PyObject*
-IcePy_version(PyObject* /*self*/)
+IcePy_stringVersion(PyObject* /*self*/)
{
string s = ICE_STRING_VERSION;
return IcePy::createString(s);
@@ -884,6 +884,13 @@ IcePy_version(PyObject* /*self*/)
extern "C"
PyObject*
+IcePy_intVersion(PyObject* /*self*/)
+{
+ return PyInt_FromLong(ICE_INT_VERSION);
+}
+
+extern "C"
+PyObject*
IcePy_generateUUID(PyObject* /*self*/)
{
string uuid = IceUtil::generateUUID();
diff --git a/py/modules/IcePy/Util.h b/py/modules/IcePy/Util.h
index c05aacc41b3..a58e0d72ec6 100644
--- a/py/modules/IcePy/Util.h
+++ b/py/modules/IcePy/Util.h
@@ -272,7 +272,8 @@ private:
}
-extern "C" PyObject* IcePy_version(PyObject*);
+extern "C" PyObject* IcePy_stringVersion(PyObject*);
+extern "C" PyObject* IcePy_intVersion(PyObject*);
extern "C" PyObject* IcePy_identityToString(PyObject*, PyObject*);
extern "C" PyObject* IcePy_stringToIdentity(PyObject*, PyObject*);
extern "C" PyObject* IcePy_generateUUID(PyObject*);
diff --git a/py/python/Ice.py b/py/python/Ice.py
index 89735152181..fa1b1ccd3cd 100644
--- a/py/python/Ice.py
+++ b/py/python/Ice.py
@@ -36,7 +36,8 @@ import IcePy
# Add some symbols to the Ice module.
#
ObjectPrx = IcePy.ObjectPrx
-version = IcePy.version
+stringVersion = IcePy.stringVersion
+intVersion = IcePy.intVersion
generateUUID = IcePy.generateUUID
loadSlice = IcePy.loadSlice
diff --git a/rb/src/IceRuby/Util.cpp b/rb/src/IceRuby/Util.cpp
index f2df9a2fa23..8d85e4411e2 100644
--- a/rb/src/IceRuby/Util.cpp
+++ b/rb/src/IceRuby/Util.cpp
@@ -17,7 +17,7 @@ using namespace IceRuby;
extern "C"
VALUE
-IceRuby_version(int /*argc*/, VALUE* /*argv*/, VALUE /*self*/)
+IceRuby_stringVersion(int /*argc*/, VALUE* /*argv*/, VALUE /*self*/)
{
ICE_RUBY_TRY
{
@@ -28,10 +28,23 @@ IceRuby_version(int /*argc*/, VALUE* /*argv*/, VALUE /*self*/)
return Qnil;
}
+extern "C"
+VALUE
+IceRuby_intVersion(int /*argc*/, VALUE* /*argv*/, VALUE /*self*/)
+{
+ ICE_RUBY_TRY
+ {
+ return INT2FIX(ICE_INT_VERSION);
+ }
+ ICE_RUBY_CATCH
+ return Qnil;
+}
+
void
IceRuby::initUtil(VALUE iceModule)
{
- rb_define_module_function(iceModule, "version", CAST_METHOD(IceRuby_version), -1);
+ rb_define_module_function(iceModule, "stringVersion", CAST_METHOD(IceRuby_stringVersion), -1);
+ rb_define_module_function(iceModule, "intVersion", CAST_METHOD(IceRuby_intVersion), -1);
}
IceRuby::RubyException::RubyException()