summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-03-24 11:45:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-03-24 11:45:18 +0100
commit06a08ecf28e205277336a97a6173db7ccbed1adc (patch)
treea369a5044a63f8cdba9e7c0a461e24ae344486b4 /py
parentMerge branch 'R3_3_branch' (diff)
parentBug 3924: slice2py missing from VC60 installer (diff)
downloadice-06a08ecf28e205277336a97a6173db7ccbed1adc.tar.bz2
ice-06a08ecf28e205277336a97a6173db7ccbed1adc.tar.xz
ice-06a08ecf28e205277336a97a6173db7ccbed1adc.zip
Merge commit 'origin/R3_3_branch'
Conflicts: CHANGES cpp/demo/Freeze/backup/.depend cpp/demo/Freeze/bench/.depend cpp/demo/Freeze/casino/.depend cpp/demo/Freeze/customEvictor/.depend cpp/demo/Freeze/library/.depend cpp/demo/Freeze/phonebook/.depend cpp/demo/Freeze/transform/.depend cpp/demo/Glacier2/callback/.depend cpp/demo/Glacier2/chat/.depend cpp/demo/Ice/async/.depend cpp/demo/Ice/bidir/.depend cpp/demo/Ice/callback/.depend cpp/demo/Ice/converter/.depend cpp/demo/Ice/hello/.depend cpp/demo/Ice/invoke/.depend cpp/demo/Ice/latency/.depend cpp/demo/Ice/minimal/.depend cpp/demo/Ice/multicast/.depend cpp/demo/Ice/nested/.depend cpp/demo/Ice/nrvo/.depend cpp/demo/Ice/session/.depend cpp/demo/Ice/throughput/.depend cpp/demo/Ice/value/.depend cpp/demo/IceBox/hello/.depend cpp/demo/IceGrid/allocate/.depend cpp/demo/IceGrid/icebox/.depend cpp/demo/IceGrid/replication/.depend cpp/demo/IceGrid/sessionActivation/.depend cpp/demo/IceGrid/simple/.depend cpp/demo/IceStorm/clock/.depend cpp/demo/IceStorm/counter/.depend cpp/demo/IceStorm/replicated/.depend cpp/demo/IceStorm/replicated2/.depend cpp/demo/book/freeze_filesystem/.depend cpp/demo/book/lifecycle/.depend cpp/demo/book/printer/.depend cpp/demo/book/simple_filesystem/.depend cpp/src/Freeze/.depend cpp/src/FreezeScript/.depend cpp/src/Ice/.depend cpp/src/Ice/UdpTransceiver.cpp cpp/src/Ice/UdpTransceiver.h cpp/src/IceBox/.depend cpp/src/IceGrid/.depend cpp/src/IceGridLib/.depend cpp/src/IcePatch2/.depend cpp/src/IceStorm/.depend cpp/src/slice2freeze/.depend cpp/test/Freeze/complex/.depend cpp/test/Freeze/dbmap/.depend cpp/test/Freeze/evictor/.depend cpp/test/Freeze/oldevictor/.depend cpp/test/FreezeScript/dbmap/.depend cpp/test/FreezeScript/evictor/.depend cpp/test/Glacier2/attack/.depend cpp/test/Glacier2/dynamicFiltering/.depend cpp/test/Glacier2/router/.depend cpp/test/Glacier2/sessionControl/.depend cpp/test/Glacier2/ssl/.depend cpp/test/Glacier2/staticFiltering/.depend cpp/test/Ice/adapterDeactivation/.depend cpp/test/Ice/background/.depend cpp/test/Ice/binding/.depend cpp/test/Ice/checksum/.depend cpp/test/Ice/checksum/server/.depend cpp/test/Ice/custom/.depend cpp/test/Ice/exceptions/.depend cpp/test/Ice/facets/.depend cpp/test/Ice/faultTolerance/.depend cpp/test/Ice/gc/.depend cpp/test/Ice/hold/.depend cpp/test/Ice/inheritance/.depend cpp/test/Ice/interceptor/.depend cpp/test/Ice/location/.depend cpp/test/Ice/objects/.depend cpp/test/Ice/operations/.depend cpp/test/Ice/proxy/.depend cpp/test/Ice/retry/.depend cpp/test/Ice/servantLocator/.depend cpp/test/Ice/slicing/exceptions/.depend cpp/test/Ice/slicing/objects/.depend cpp/test/Ice/stream/.depend cpp/test/Ice/stringConverter/.depend cpp/test/Ice/timeout/.depend cpp/test/Ice/udp/.depend cpp/test/IceBox/configuration/.depend cpp/test/IceGrid/activation/.depend cpp/test/IceGrid/allocation/.depend cpp/test/IceGrid/deployer/.depend cpp/test/IceGrid/distribution/.depend cpp/test/IceGrid/replicaGroup/.depend cpp/test/IceGrid/replication/.depend cpp/test/IceGrid/session/.depend cpp/test/IceGrid/simple/.depend cpp/test/IceGrid/update/.depend cpp/test/IceSSL/configuration/.depend cpp/test/IceStorm/federation/.depend cpp/test/IceStorm/federation2/.depend cpp/test/IceStorm/rep1/.depend cpp/test/IceStorm/repgrid/.depend cpp/test/IceStorm/repstress/.depend cpp/test/IceStorm/single/.depend cpp/test/IceStorm/stress/.depend cpp/test/Slice/keyword/.depend cs/src/Ice/Instance.cs cs/src/IceSSL/ConnectorI.cs java/demo/book/simple_filesystem/Filesystem/DirectoryI.java java/demo/book/simple_filesystem/Filesystem/FileI.java java/src/IceInternal/TcpConnector.java java/src/IceSSL/ConnectorI.java py/modules/IcePy/.depend rb/src/IceRuby/.depend
Diffstat (limited to 'py')
-rw-r--r--py/INSTALL35
-rwxr-xr-xpy/allDemos.py7
-rw-r--r--py/config/Make.rules62
-rw-r--r--py/config/Make.rules.mak11
-rwxr-xr-xpy/demo/Glacier2/callback/Server.py2
-rwxr-xr-xpy/demo/Ice/callback/Server.py2
-rw-r--r--py/demo/Ice/protobuf/Client.py69
-rw-r--r--py/demo/Ice/protobuf/Hello.ice28
-rw-r--r--py/demo/Ice/protobuf/Person.proto16
-rw-r--r--py/demo/Ice/protobuf/README39
-rw-r--r--py/demo/Ice/protobuf/Server.py38
-rw-r--r--py/demo/Ice/protobuf/config.client23
-rw-r--r--py/demo/Ice/protobuf/config.server24
-rwxr-xr-xpy/demo/Ice/protobuf/expect.py30
-rwxr-xr-xpy/demo/Ice/value/Client.py10
-rwxr-xr-xpy/demo/book/simple_filesystem/Server.py8
-rwxr-xr-xpy/makebindist.py311
-rw-r--r--py/modules/IcePy/.depend4
-rw-r--r--py/modules/IcePy/Init.cpp2
-rw-r--r--py/modules/IcePy/ObjectFactory.cpp4
-rw-r--r--py/modules/IcePy/Operation.cpp39
-rw-r--r--py/modules/IcePy/Types.cpp205
-rw-r--r--py/modules/IcePy/Types.h27
-rw-r--r--py/modules/IcePy/Util.h5
-rw-r--r--py/python/Ice.py7
-rwxr-xr-xpy/test/Ice/faultTolerance/run.py3
-rwxr-xr-xpy/test/Ice/operations/ServerAMD.py6
-rw-r--r--py/test/Ice/operations/Test.ice10
-rw-r--r--py/test/Ice/operations/TestAMD.ice10
-rw-r--r--py/test/Ice/operations/TestI.py6
-rw-r--r--py/test/Ice/operations/Twoways.py27
-rw-r--r--py/test/Ice/operations/TwowaysAMI.py51
-rw-r--r--py/test/Ice/protobuf/AllTests.py75
-rwxr-xr-xpy/test/Ice/protobuf/Client.py58
-rwxr-xr-xpy/test/Ice/protobuf/Server.py68
-rw-r--r--py/test/Ice/protobuf/Test.ice54
-rw-r--r--py/test/Ice/protobuf/Test.proto16
-rwxr-xr-xpy/test/Ice/protobuf/run.py33
-rw-r--r--py/test/Slice/keyword/Key.ice1
-rwxr-xr-xpy/test/Slice/keyword/run.py3
40 files changed, 1003 insertions, 426 deletions
diff --git a/py/INSTALL b/py/INSTALL
index f3d61f919ef..2e09c112a84 100644
--- a/py/INSTALL
+++ b/py/INSTALL
@@ -3,8 +3,8 @@ Requirements
======================================================================
- Ice @ver@
-- Python 2.3, 2.4, or 2.5 built with a C++ compiler compatible with
- the C++ compiler used to build Ice for C++.
+- Python 2.3, 2.4, 2.5 or 2.6 built with a C++ compiler compatible
+ with the C++ compiler used to build Ice for C++.
Depending on your platform, you may need to download the Python source
distribution from http://www.python.org and make your own Python
@@ -34,7 +34,7 @@ Follow these steps to build the Ice extension for Python:
* Modify the installation prefix (if necessary).
- * Review the comments describing the PYTHON_HOME variable.
+ * Review the comments describing the PYTHON_VERSION variable.
4) Execute 'python -V' to verify that the correct Python interpreter
is in your executable search path.
@@ -62,10 +62,11 @@ compiler that Ice supports. Although the Python developers do not
support the use of Python extensions that are compiled with other
versions of Visual C++, we have tested the Ice extension built with
Visual C++ 8.0 SP1 and experienced no issues in combination with
-Python's binary distribution. It should also be possible to use the
-Ice extension when compiled with Visual C++ 6.0, however the extension
-cannot be compiled with Visual C++ 9.0. The optimal solution is to
-compile both Python and Ice using Visual C++ 8.0 SP1.
+Python's binary distribution. The Python 2.6.x binary distribution
+is compiled with Visual C++ 9.0, you should use this binary
+distribution if you want to compile the Ice extension with Visual C++ 9.0.
+
+Visual C++ 6.0 is not supported with Ice for Python.
Follow these steps to build the Ice extension for Python:
@@ -110,23 +111,13 @@ Visual C++ 2005 Express SP1 Setup
Users of Visual C++ 2005 Express SP1 need to install the Microsoft
Platform SDK:
- http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
-
-You also need to add the Platform SDK directories to the INCLUDE, LIB
-and PATH environment variables. For example:
-
-@SET PDK_HOME=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
-@SET PATH=%PDK_HOME%\bin;%PATH%
-@SET INCLUDE=%PDK_HOME%\include;%INCLUDE%
-@SET LIB=%PDK_HOME%\lib;%LIB%
+ http://www.microsoft.com/Downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
-The PDK_HOME environment variable must be defined in order to build
-the Ice source distribution. Note that PDK_HOME must not contain a
-trailing backslash (\).
+Once installed, you need to add the Platform SDK directories to the
+INCLUDE, LIB and PATH environment variables. This can be done by
+executing the following script from within the compiler command prompt:
-You may also need to execute the vsvars32.bat script, located in
-C:\Program Files\Microsoft Visual Studio 8\Common7\Tools, to properly
-configure your build environment.
+ C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd
======================================================================
diff --git a/py/allDemos.py b/py/allDemos.py
index 5829ada88a7..230ffb8286e 100755
--- a/py/allDemos.py
+++ b/py/allDemos.py
@@ -41,5 +41,10 @@ demos = [
"book/simple_filesystem"
]
+protoDemos = [
+ "Ice/protobuf"
+]
+
+
if __name__ == "__main__":
- Util.run(demos)
+ Util.run(demos, protoDemos)
diff --git a/py/config/Make.rules b/py/config/Make.rules
index 581fb676631..d50c158c9ff 100644
--- a/py/config/Make.rules
+++ b/py/config/Make.rules
@@ -39,63 +39,19 @@ embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
#
#
-# If you've built Python yourself then set PYTHON_HOME to contain
-# the installation directory; the rest of the Python-related settings
-# should be correct.
+# If multiple versions of Python are installed and you want a specific
+# version used for building the Ice extension, then set PYTHON_VERSION
+# to a value like "python2.5". Otherwise, the settings below use the
+# default Python interpreter found in your PATH.
#
-# If you've installed a distribution, or Python was included with
-# your system, then you likely need to review the values of
-# PYTHON_INCLUDE_DIR and PYTHON_LIB_DIR.
-#
-
-ifneq ($(PYTHON_HOME),)
- #
- # If multiple versions of Python are installed and you want a specific
- # version used for building the Ice extension, then set PYTHON_VERSION
- # to "python2.3", "python2.4", or "python2.5".
- #
- PYTHON_VERSION ?= $(notdir $(wildcard $(PYTHON_HOME)/include/python2*))
+PYTHON_VERSION ?= python$(shell python -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_python_version())")
- ifeq ($(words $(PYTHON_VERSION)),0)
- $(error No Python version found in PYTHON_HOME=$(PYTHON_HOME). See config/Make.rules)
- endif
- ifneq ($(words $(PYTHON_VERSION)),1)
- $(error More than one Python version found in PYTHON_HOME=$(PYTHON_HOME). Select a version by setting PYTHON_VERSION. See config/Make.rules)
- endif
+PYTHON_INCLUDE_DIR ?= $(shell $(PYTHON_VERSION) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_python_inc())")
- PYTHON_INCLUDE_DIR = $(PYTHON_HOME)/include/$(PYTHON_VERSION)
-
- ifeq ($(UNAME), HP-UX)
- #
- # The Python shared library is installed in $(PYTHON_HOME)/lib on HP-UX
- # rather than $(PYTHON_HOME)/lib/$(PYTHON_VERSION)/config.
- #
- PYTHON_LIB_DIR = $(PYTHON_HOME)/lib
- else
- PYTHON_LIB_DIR = $(PYTHON_HOME)/lib/$(PYTHON_VERSION)/config
- endif
-else
- #
- # If multiple versions of Python are installed and you want a specific
- # version used for building the Ice extension, then set PYTHON_VERSION
- # to "python2.3", "python2.4", or "python2.5".
- #
- PYTHON_VERSION ?= $(word 1,$(notdir $(wildcard /usr/include/python2.[345]*)))
- ifeq ($(PYTHON_VERSION),)
- python_darwin_home = /System/Library/Frameworks/Python.framework/Versions/Current
- PYTHON_VERSION = $(word 1,$(notdir $(wildcard $(python_darwin_home)/include/python2.[345]*)))
- endif
-
- ifeq ($(PYTHON_VERSION),)
- $(error Unable to find Python 2.3, 2.4, or 2.5. See config/Make.rules)
- endif
-
- PYTHON_INCLUDE_DIR = /usr/include/$(PYTHON_VERSION)
- PYTHON_LIB_DIR = /usr/lib/$(PYTHON_VERSION)/config
-endif
+PYTHON_LIB_DIR ?= $(shell $(PYTHON_VERSION) -c "import os; import sys; import distutils.sysconfig as ds; sys.stdout.write(os.path.join(ds.get_python_lib(plat_specific=1,standard_lib=1), 'config'))")
-PYTHON_FLAGS ?= -I$(PYTHON_INCLUDE_DIR)
-PYTHON_LIBS ?= -L$(PYTHON_LIB_DIR) -l$(PYTHON_VERSION)
+PYTHON_FLAGS ?= -I$(PYTHON_INCLUDE_DIR)
+PYTHON_LIBS ?= -L$(PYTHON_LIB_DIR) -l$(PYTHON_VERSION)
# ----------------------------------------------------------------------
diff --git a/py/config/Make.rules.mak b/py/config/Make.rules.mak
index 45337d19696..66ba46a2e5e 100644
--- a/py/config/Make.rules.mak
+++ b/py/config/Make.rules.mak
@@ -49,18 +49,11 @@ STLPORT_HOME = C:\Ice-$(VERSION)-ThirdParty-VC60
!endif
#
-# For VC80 and VC80 Express it is necessary to set the location of the
-# manifest tool. This must be the 6.x version of mt.exe, not the 5.x
-# version!
-#
-# For VC80 Express mt.exe 6.x is provided by the Windows Platform SDK.
-# It is necessary to set the location of the Platform SDK through the
-# PDK_HOME environment variable (see INSTALL for details).
+# For VC80 it is necessary to set the location of the manifest tool.
+# This must be the 6.x version of mt.exe, not the 5.x version!
#
!if "$(CPP_COMPILER)" == "VC80"
MT = "$(VS80COMNTOOLS)bin\mt.exe"
-!elseif "$(CPP_COMPILER)" == "VC80_EXPRESS"
-MT = "$(PDK_HOME)\bin\mt.exe"
!else
MT = mt.exe
!endif
diff --git a/py/demo/Glacier2/callback/Server.py b/py/demo/Glacier2/callback/Server.py
index 889d71b95c8..ea50ffec29f 100755
--- a/py/demo/Glacier2/callback/Server.py
+++ b/py/demo/Glacier2/callback/Server.py
@@ -17,7 +17,7 @@ class CallbackI(Demo.Callback):
def initiateCallback(self, proxy, current=None):
print "initiating callback to: " + current.adapter.getCommunicator().proxyToString(proxy)
try:
- proxy.callback(current.ctx)
+ proxy.callback()
except:
traceback.print_exc()
diff --git a/py/demo/Ice/callback/Server.py b/py/demo/Ice/callback/Server.py
index bc1b3233b95..b048c253fc7 100755
--- a/py/demo/Ice/callback/Server.py
+++ b/py/demo/Ice/callback/Server.py
@@ -17,7 +17,7 @@ class CallbackSenderI(Demo.CallbackSender):
def initiateCallback(self, proxy, current=None):
print "initiating callback"
try:
- proxy.callback(current.ctx)
+ proxy.callback()
except:
traceback.print_exc()
diff --git a/py/demo/Ice/protobuf/Client.py b/py/demo/Ice/protobuf/Client.py
new file mode 100644
index 00000000000..ca4b7e17b5c
--- /dev/null
+++ b/py/demo/Ice/protobuf/Client.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import sys, traceback, Ice
+
+Ice.loadSlice('Hello.ice')
+import Demo
+from Person_pb2 import Person
+
+def menu():
+ print """
+usage:
+t: send greeting
+s: shutdown server
+x: exit
+?: help
+"""
+
+class Client(Ice.Application):
+ def run(self, args):
+ if len(args) > 1:
+ print self.appName() + ": too many arguments"
+ return 1
+
+ hello = Demo.HelloPrx.checkedCast(self.communicator().propertyToProxy('Hello.Proxy'))
+ if not hello:
+ print args[0] + ": invalid proxy"
+ return 1
+
+ menu()
+
+ p = Person()
+ p.id = 1
+ p.name = "Fred Jones"
+ p.email = "fred@jones.com"
+
+ c = None
+ while c != 'x':
+ try:
+ c = raw_input("==> ")
+ if c == 't':
+ hello.sayHello(p)
+ elif c == 's':
+ hello.shutdown()
+ elif c == 'x':
+ pass # Nothing to do
+ elif c == '?':
+ menu()
+ else:
+ print "unknown command `" + c + "'"
+ menu()
+ except KeyboardInterrupt:
+ break
+ except EOFError:
+ break
+ except Ice.Exception, ex:
+ print ex
+
+ return 0
+
+app = Client()
+sys.exit(app.main(sys.argv, "config.client"))
diff --git a/py/demo/Ice/protobuf/Hello.ice b/py/demo/Ice/protobuf/Hello.ice
new file mode 100644
index 00000000000..f987ad8da31
--- /dev/null
+++ b/py/demo/Ice/protobuf/Hello.ice
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+module Demo
+{
+
+["cpp:protobuf:tutorial::Person", "java:protobuf:tutorial.PersonPB.Person", "python:protobuf:Person_pb2.Person"]
+sequence<byte> Person;
+
+interface Hello
+{
+ idempotent void sayHello(Person p);
+ void shutdown();
+};
+
+};
+
+
+#endif
diff --git a/py/demo/Ice/protobuf/Person.proto b/py/demo/Ice/protobuf/Person.proto
new file mode 100644
index 00000000000..b68990dbc48
--- /dev/null
+++ b/py/demo/Ice/protobuf/Person.proto
@@ -0,0 +1,16 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package tutorial;
+
+message Person {
+ required int32 id = 1;
+ required string name = 2;
+ optional string email = 3;
+}
diff --git a/py/demo/Ice/protobuf/README b/py/demo/Ice/protobuf/README
new file mode 100644
index 00000000000..91f1d18598f
--- /dev/null
+++ b/py/demo/Ice/protobuf/README
@@ -0,0 +1,39 @@
+This demo shows how to integrate Google Protocol Buffers with Ice.
+
+The Protocol Buffers distribution and documentation can be found at
+
+ http://code.google.com/apis/protocolbuffers/
+
+This demo was tested with Protocol Buffers version 2.0.3.
+
+We have added new metadata that makes it possible for you to specify
+protocol buffers message types in your Slice definitions, with Ice
+handling the serialization chores for you automatically. The metadata,
+which may only be used on a sequence<byte> type, has the following
+syntax in Python:
+
+ python:protobuf:protoc-generated-class
+
+For example:
+
+ ["python:protobuf:Person_pb2.Person"] sequence<byte> Person;
+
+The type name specified in this example, Person_pb2.Person,
+corresponds to the Python class generated by the Protocol Buffers
+compiler (protoc) for the definition shown below:
+
+ package tutorial;
+ message Person { ... };
+
+Prior to running the demo, you must generate the Python code for
+Person.proto by running the following command:
+
+ $ protoc --python_out=. Person.proto
+
+To run the demo, first start the server:
+
+ $ python Server.py
+
+In a separate window, start the client:
+
+ $ python Client.py
diff --git a/py/demo/Ice/protobuf/Server.py b/py/demo/Ice/protobuf/Server.py
new file mode 100644
index 00000000000..0ccd8d6dbc5
--- /dev/null
+++ b/py/demo/Ice/protobuf/Server.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import sys, traceback, time, Ice
+
+Ice.loadSlice('Hello.ice')
+import Demo
+from Person_pb2 import Person
+
+class HelloI(Demo.Hello):
+ def sayHello(self, p, current=None):
+ print "Hello World from %s" % str(p)
+
+ def shutdown(self, current=None):
+ current.adapter.getCommunicator().shutdown()
+
+class Server(Ice.Application):
+ def run(self, args):
+ if len(args) > 1:
+ print self.appName() + ": too many arguments"
+ return 1
+
+ adapter = self.communicator().createObjectAdapter("Hello")
+ adapter.add(HelloI(), self.communicator().stringToIdentity("hello"))
+ adapter.activate()
+ self.communicator().waitForShutdown()
+ return 0
+
+sys.stdout.flush()
+app = Server()
+sys.exit(app.main(sys.argv, "config.server"))
diff --git a/py/demo/Ice/protobuf/config.client b/py/demo/Ice/protobuf/config.client
new file mode 100644
index 00000000000..a02cab0f4cb
--- /dev/null
+++ b/py/demo/Ice/protobuf/config.client
@@ -0,0 +1,23 @@
+#
+# The client reads this property to create the reference to the
+# "hello" object in the server.
+#
+Hello.Proxy=hello:tcp -p 10000
+
+#
+# Network Tracing
+#
+# 0 = no network tracing
+# 1 = trace connection establishment and closure
+# 2 = like 1, but more detailed
+# 3 = like 2, but also trace data transfer
+#
+#Ice.Trace.Network=1
+
+#
+# Protocol Tracing
+#
+# 0 = no protocol tracing
+# 1 = trace protocol messages
+#
+#Ice.Trace.Protocol=1
diff --git a/py/demo/Ice/protobuf/config.server b/py/demo/Ice/protobuf/config.server
new file mode 100644
index 00000000000..309db9731b2
--- /dev/null
+++ b/py/demo/Ice/protobuf/config.server
@@ -0,0 +1,24 @@
+#
+# The server creates one single object adapter with the name
+# "Hello". The following line sets the endpoints for this
+# adapter.
+#
+Hello.Endpoints=tcp -p 10000
+
+#
+# Network Tracing
+#
+# 0 = no network tracing
+# 1 = trace connection establishment and closure
+# 2 = like 1, but more detailed
+# 3 = like 2, but also trace data transfer
+#
+#Ice.Trace.Network=1
+
+#
+# Protocol Tracing
+#
+# 0 = no protocol tracing
+# 1 = trace protocol messages
+#
+#Ice.Trace.Protocol=1
diff --git a/py/demo/Ice/protobuf/expect.py b/py/demo/Ice/protobuf/expect.py
new file mode 100755
index 00000000000..6db9aa22652
--- /dev/null
+++ b/py/demo/Ice/protobuf/expect.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import sys, os
+
+path = [ ".", "..", "../..", "../../..", "../../../.." ]
+head = os.path.dirname(sys.argv[0])
+if len(head) > 0:
+ path = [os.path.join(head, p) for p in path]
+path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "demoscript")) ]
+if len(path) == 0:
+ raise "can't find toplevel directory!"
+sys.path.append(path[0])
+
+from demoscript import *
+from demoscript.Ice import protobuf
+
+server = Util.spawn('Server.py --Ice.PrintAdapterReady --Ice.Warn.Connections=0')
+server.expect('.* ready')
+client = Util.spawn('Client.py --Ice.Warn.Connections=0')
+client.expect('.*==>')
+
+protobuf.run(client, server)
diff --git a/py/demo/Ice/value/Client.py b/py/demo/Ice/value/Client.py
index e5b89c773da..0dbdeed4376 100755
--- a/py/demo/Ice/value/Client.py
+++ b/py/demo/Ice/value/Client.py
@@ -15,10 +15,10 @@ import Demo, Printer
class ObjectFactory(Ice.ObjectFactory):
def create(self, type):
- if type == "::Demo::Printer":
+ if type == Demo.Printer.ice_staticId():
return Printer.PrinterI()
- if type == "::Demo::DerivedPrinter":
+ if type == Demo.DerivedPrinter.ice_staticId():
return Printer.DerivedPrinterI()
assert(False)
@@ -70,7 +70,7 @@ class Client(Ice.Application):
raw_input()
factory = ObjectFactory()
- self.communicator().addObjectFactory(factory, "::Demo::Printer")
+ self.communicator().addObjectFactory(factory, Demo.Printer.ice_staticId())
printer, printerProxy = initial.getPrinter()
print "==> " + printer.message
@@ -102,7 +102,7 @@ class Client(Ice.Application):
derivedAsBase = initial.getDerivedPrinter()
print "==> The type ID of the received object is \"" + derivedAsBase.ice_id() + "\""
- assert(derivedAsBase.ice_id() == "::Demo::Printer")
+ assert(derivedAsBase.ice_id() == Demo.Printer.ice_staticId())
print '\n'\
"Now we install a factory for the derived class, and try again.\n"\
@@ -111,7 +111,7 @@ class Client(Ice.Application):
"[press enter]"
raw_input()
- self.communicator().addObjectFactory(factory, "::Demo::DerivedPrinter")
+ self.communicator().addObjectFactory(factory, Demo.DerivedPrinter.ice_staticId())
derived = initial.getDerivedPrinter()
print "==> The type ID of the received object is \"" + derived.ice_id() + "\""
diff --git a/py/demo/book/simple_filesystem/Server.py b/py/demo/book/simple_filesystem/Server.py
index ea408b2fbbd..75982f0b70b 100755
--- a/py/demo/book/simple_filesystem/Server.py
+++ b/py/demo/book/simple_filesystem/Server.py
@@ -21,10 +21,11 @@ class DirectoryI(Filesystem.Directory):
# Create an identity. The root directory has the fixed identity "RootDir"
#
+ self._id = Ice.Identity()
if self._parent:
- self._id = communicator.stringToIdentity(Ice.generateUUID())
+ self._id.name = Ice.generateUUID()
else:
- self._id = communicator.stringToIdentity("RootDir")
+ self._id.name = "RootDir"
# Slice Node::name() operation
@@ -59,7 +60,8 @@ class FileI(Filesystem.File):
# Create an identity
#
- self._id = communicator.stringToIdentity(Ice.generateUUID())
+ self._id = Ice.Identity()
+ self._id.name = Ice.generateUUID()
# Slice Node::name() operation
diff --git a/py/makebindist.py b/py/makebindist.py
deleted file mode 100755
index 8ff686047cd..00000000000
--- a/py/makebindist.py
+++ /dev/null
@@ -1,311 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys, shutil, fnmatch, re, string, glob
-
-#
-# Show usage information.
-#
-def usage():
- print "Usage: " + sys.argv[0] + " [options] [tag]"
- print
- print "Options:"
- print "-h Show this message."
- print "-v Be verbose."
- print
- print "If no tag is specified, HEAD is used."
-
-def getIceVersion(file):
- config = open(file, "r")
- return re.search("ICE_STRING_VERSION \"([0-9\.]*)\"", config.read()).group(1)
-
-def getIceSoVersion(file):
- config = open(file, "r")
- intVersion = int(re.search("ICE_INT_VERSION ([0-9]*)", config.read()).group(1))
- majorVersion = intVersion / 10000
- minorVersion = intVersion / 100 - 100 * majorVersion
- return '%d' % (majorVersion * 10 + minorVersion)
-
-def copyLibrary(src, dst, name, python):
- global platform, version, intVer
-
- if platform == "hpux":
- soBase = name
- soLib = name + ".sl"
- else:
- soBase = name + ".so"
- soLib = soBase
-
- if not python and platform == "macosx":
- soVer = name + '.' + version + ".dylib"
- soInt = name + '.' + intVer + ".dylib"
- soLib = name + ".dylib"
- else:
- soVer = soBase + '.' + version
- soInt = soBase + '.' + intVer
-
- cwd = os.getcwd()
- shutil.copyfile(src + "/" + soVer, dst + "/" + soVer)
- os.chdir(dst)
- os.symlink(soVer, soInt)
- os.symlink(soInt, soLib)
- os.chdir(cwd)
-
-#
-# Check arguments
-#
-tag = "-rHEAD"
-verbose = 0
-for x in sys.argv[1:]:
- if x == "-h":
- usage()
- sys.exit(0)
- elif x == "-v":
- verbose = 1
- elif x.startswith("-"):
- print sys.argv[0] + ": unknown option `" + x + "'"
- print
- usage()
- sys.exit(1)
- else:
- tag = "-r" + x
-
-if not os.environ.has_key("ICE_HOME"):
- print "The ICE_HOME environment variable is not set."
- sys.exit(1)
-
-#
-# Get platform.
-#
-platform = ""
-if sys.platform.startswith("win") or sys.platform.startswith("cygwin"):
- platform = "win32"
-elif sys.platform.startswith("linux"):
- platform = "linux"
-elif sys.platform.startswith("sunos"):
- platform = "solaris"
-elif sys.platform.startswith("hp"):
- platform = "hpux"
-elif sys.platform.startswith("darwin"):
- platform = "macosx"
-elif sys.platform.startswith("aix"):
- platform = "aix"
-else:
- print "unknown platform (" + sys.platform + ")!"
- sys.exit(1)
-
-if not os.path.exists(os.path.join("python", "Ice_BuiltinSequences_ice.py")):
- print "makebindist.py must be run in a compiled IcePy tree"
- sys.exit(1)
-
-#
-# Save the current directory.
-#
-topdir = os.getcwd()
-
-#
-# Remove any existing distribution directory and create a new one.
-#
-distdir = "bindist"
-if os.path.exists(distdir):
- shutil.rmtree(distdir)
-os.mkdir(distdir)
-os.chdir(distdir)
-cwd = os.getcwd()
-
-#
-# Export sources from CVS.
-#
-print "Checking out CVS tag " + tag + "..."
-if verbose:
- quiet = ""
-else:
- quiet = "-Q"
-if platform == "aix":
- os.environ["LIBPATH"] = ""
- os.system("cvs " + quiet + " -d cvsint.zeroc.com:/home/cvsroot export " + tag +
- " ice/slice ice/include/IceUtil/Config.h icepy")
-else:
- os.system("cvs " + quiet + " -d cvs.zeroc.com:/home/cvsroot export " + tag +
- " ice/slice ice/include/IceUtil/Config.h icepy")
-
-#
-# Get Ice version.
-#
-version = getIceVersion("ice/include/IceUtil/Config.h")
-intVer = getIceSoVersion("ice/include/IceUtil/Config.h")
-
-#
-# Verify Ice version in CVS export matches the one in ICE_HOME.
-#
-version2 = getIceVersion(os.environ["ICE_HOME"] + "/include/IceUtil/Config.h")
-if version != version2:
- print sys.argv[0] + ": the CVS version (" + version + ") does not match ICE_HOME (" + version2 + ")"
- sys.exit(1)
-
-#
-# Copy Slice directories.
-#
-print "Copying Slice directories..."
-slicedirs = [\
- "Glacier2",\
- "Ice",\
- "IceBox",\
- "IceGrid",\
- "IcePatch2",\
- "IceStorm",\
-]
-os.mkdir(os.path.join("icepy", "slice"))
-for x in slicedirs:
- shutil.copytree(os.path.join("ice", "slice", x), os.path.join("icepy", "slice", x), 1)
-for x in glob.glob(os.path.join("ice", "config", "Make.rules.*")):
- shutil.copyfile(x, os.path.join("icepy", "config", os.path.basename(x)))
-
-#
-# Translate Slice files.
-#
-print "Translating..."
-cwd = os.getcwd()
-os.chdir(os.path.join("icepy", "python"))
-if verbose:
- quiet = ""
-else:
- quiet = " -s"
-os.system("gmake" + quiet)
-os.chdir(cwd)
-
-#
-# Remove files.
-#
-print "Removing unnecessary files..."
-filesToRemove = [ \
- os.path.join("icepy", "makedist.py"), \
- os.path.join("icepy", "makebindist.py"), \
- os.path.join("icepy", "all.dsw"), \
- os.path.join("icepy", "Makefile"), \
- os.path.join("icepy", "config", "Make.rules"), \
- os.path.join("icepy", "python", "Makefile"), \
- os.path.join("icepy", "python", "generate.mak"), \
- os.path.join("icepy", "python", "Python.dsp"), \
- os.path.join("icepy", "bin", ".dummy"), \
- ]
-for x in filesToRemove:
- os.remove(x)
-shutil.rmtree(os.path.join("icepy", "modules"))
-
-#
-# Copy executables and libraries.
-#
-print "Copying executables and libraries..."
-icehome = os.environ["ICE_HOME"]
-executables = [ ]
-libraries = [ ]
-symlinks = 0
-debug = ""
-strip = 1
-iceExecutables = [ \
- "icecpp",\
- "slice2py",\
-]
-iceLibraries = [ \
- "libIceUtil",\
- "libSlice",\
- "libIce",\
- "libIceSSL",\
- "libIceXML",\
-]
-pyLibraries = [ \
- "IcePy",\
-]
-if platform != "aix":
- symlinks = 1
-
-bindir = os.path.join("icepy", "bin")
-libdir = os.path.join("icepy", "lib")
-
-for x in iceExecutables:
- shutil.copyfile(icehome + "/bin/" + x, bindir + "/" + x)
-
-if symlinks:
- for so in iceLibraries:
- copyLibrary(icehome + "/lib", libdir, so, 0)
-
- for so in pyLibraries:
- copyLibrary(topdir + "/lib", libdir, so, 1)
-else:
- for lib in iceLibraries:
- if platform == "aix":
- shutil.copyfile(icehome + "/lib/" + lib + ".a", libdir + "/" + lib + ".a")
- else:
- shutil.copyfile(icehome + "/lib/" + lib, libdir + "/" + lib)
- for lib in pyLibraries:
- if platform == "aix":
- shutil.copyfile("lib/" + lib + ".a", libdir + "/" + lib + ".a")
- else:
- shutil.copyfile(topdir + "/lib", libdir + "/" + lib)
-
-if strip:
-
- stripOpts=""
- if platform == "macosx":
- stripOpts="-x"
-
- for x in iceExecutables:
- os.system("strip " + stripOpts + " " + bindir + "/" + x)
- os.chmod(bindir + "/" + x, 0755)
- for x in iceLibraries:
- if platform == "hpux":
- soLib = x + ".sl"
- elif platform == "macosx":
- soLib = x + ".dylib"
- elif platform == "aix":
- soLib = x + ".a"
- else:
- soLib = x + ".so"
- os.system("strip " + stripOpts + " " + libdir + "/" + soLib)
- for x in pyLibraries:
- if platform == "hpux":
- soLib = x + ".sl"
- elif platform == "aix":
- soLib = x + ".a"
- else:
- soLib = x + ".so"
- os.system("strip " + stripOpts + " " + libdir + "/" + soLib)
-
-
-#
-# Create binary archives.
-#
-print "Creating distribution..."
-icever = "IcePy-" + version
-os.rename("icepy", icever)
-if verbose:
- quiet = "v"
-else:
- quiet = ""
-os.system("tar c" + quiet + "f " + icever + "-bin-" + platform + ".tar " + icever)
-os.system("gzip -9 " + icever + "-bin-" + platform + ".tar")
-if verbose:
- quiet = ""
-else:
- quiet = "-q"
-os.system("zip -9 -r -y " + quiet + " " + icever + "-bin-" + platform + ".zip " + icever)
-
-#
-# Copy files (README, etc.).
-#
-
-#
-# Done.
-#
-print "Cleaning up..."
-shutil.rmtree(icever)
-shutil.rmtree("ice")
-print "Done."
diff --git a/py/modules/IcePy/.depend b/py/modules/IcePy/.depend
index 51b0225aa17..87ce300a05c 100644
--- a/py/modules/IcePy/.depend
+++ b/py/modules/IcePy/.depend
@@ -6,10 +6,10 @@ Init$(OBJEXT): Init.cpp ./Communicator.h ./Config.h $(ice_cpp_dir)/include/Ice/C
Logger$(OBJEXT): Logger.cpp ./Logger.h ./Config.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Logger.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h
ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ./ObjectAdapter.h ./Config.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h ./Communicator.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ./Current.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h ./Operation.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/StreamF.h ./Proxy.h ./Types.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/IceUtil/StaticMutex.h $(ice_cpp_dir)/include/Ice/UserExceptionFactoryF.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Router.h $(ice_cpp_dir)/include/Ice/ServantLocator.h
ObjectFactory$(OBJEXT): ObjectFactory.cpp ./ObjectFactory.h ./Config.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/Ice/ObjectFactory.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h ./Types.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/LocalException.h
-Operation$(OBJEXT): Operation.cpp ./Operation.h ./Config.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/StreamF.h ./Current.h ./Proxy.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ./Types.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h
+Operation$(OBJEXT): Operation.cpp ./Operation.h ./Config.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/StreamF.h ./Current.h ./Proxy.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ./Types.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Logger.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h
Properties$(OBJEXT): Properties.cpp ./Properties.h ./Config.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h
Proxy$(OBJEXT): Proxy.cpp $(ice_cpp_dir)/include/IceUtil/DisableWarnings.h ./Proxy.h ./Config.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h ./Communicator.h ./Connection.h $(ice_cpp_dir)/include/Ice/ConnectionF.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h ./Operation.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/IceUtil/StaticMutex.h $(ice_cpp_dir)/include/Ice/UserExceptionFactoryF.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/Router.h
-Slice$(OBJEXT): Slice.cpp ./Slice.h ./Config.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Slice/Preprocessor.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Slice/SignalHandler.h $(ice_cpp_dir)/include/IceUtil/Options.h $(ice_cpp_dir)/include/IceUtil/RecMutex.h
+Slice$(OBJEXT): Slice.cpp ./Slice.h ./Config.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Slice/Preprocessor.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/IceUtil/Options.h $(ice_cpp_dir)/include/IceUtil/RecMutex.h
ThreadNotification$(OBJEXT): ThreadNotification.cpp ./ThreadNotification.h ./Config.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h
Types$(OBJEXT): Types.cpp ./Types.h ./Config.h ./Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h ./Current.h ./Proxy.h $(ice_cpp_dir)/include/IceUtil/InputUtil.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/LocalException.h
Util$(OBJEXT): Util.cpp ./Util.h ./Config.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/DisableWarnings.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/IceUtil/UUID.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h
diff --git a/py/modules/IcePy/Init.cpp b/py/modules/IcePy/Init.cpp
index 2fb191f7d8b..76db57e43a7 100644
--- a/py/modules/IcePy/Init.cpp
+++ b/py/modules/IcePy/Init.cpp
@@ -47,6 +47,8 @@ static PyMethodDef methods[] =
PyDoc_STR(STRCAST("internal function")) },
{ STRCAST("defineSequence"), reinterpret_cast<PyCFunction>(IcePy_defineSequence), METH_VARARGS,
PyDoc_STR(STRCAST("internal function")) },
+ { STRCAST("defineCustom"), reinterpret_cast<PyCFunction>(IcePy_defineCustom), METH_VARARGS,
+ PyDoc_STR(STRCAST("internal function")) },
{ STRCAST("defineDictionary"), reinterpret_cast<PyCFunction>(IcePy_defineDictionary), METH_VARARGS,
PyDoc_STR(STRCAST("internal function")) },
{ STRCAST("declareProxy"), reinterpret_cast<PyCFunction>(IcePy_declareProxy), METH_VARARGS,
diff --git a/py/modules/IcePy/ObjectFactory.cpp b/py/modules/IcePy/ObjectFactory.cpp
index cfc87158368..badf7716ae1 100644
--- a/py/modules/IcePy/ObjectFactory.cpp
+++ b/py/modules/IcePy/ObjectFactory.cpp
@@ -62,6 +62,7 @@ IcePy::ObjectFactory::create(const string& id)
PyObjectHandle obj = PyObject_CallMethod(factory, STRCAST("create"), STRCAST("s"), id.c_str());
if(!obj.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
if(obj.get() == Py_None)
@@ -87,6 +88,7 @@ IcePy::ObjectFactory::create(const string& id)
PyObjectHandle obj = type->tp_new(type, args.get(), 0);
if(!obj.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -116,7 +118,7 @@ IcePy::ObjectFactory::destroy()
// Invoke the destroy method on each registered Python factory.
//
PyObjectHandle obj = PyObject_CallMethod(p->second, STRCAST("destroy"), 0);
- PyErr_Clear();
+ PyErr_Clear(); // Ignore errors.
Py_DECREF(p->second);
}
}
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index 9dfaf051504..c72835747d9 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -19,8 +19,10 @@
#include <Ice/IncomingAsync.h>
#include <Ice/Initialize.h>
#include <Ice/LocalException.h>
+#include <Ice/Logger.h>
#include <Ice/ObjectAdapter.h>
#include <Ice/OutgoingAsync.h>
+#include <Ice/Properties.h>
#include <Ice/Proxy.h>
#include <Slice/PythonUtil.h>
@@ -901,6 +903,7 @@ IcePy::TypedInvocation::prepareRequest(PyObject* args, bool async, vector<Ice::B
}
catch(const AbortMarshaling&)
{
+ assert(PyErr_Occurred());
return false;
}
catch(const Ice::Exception& ex)
@@ -950,11 +953,15 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice:
PyObject*
IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>& bytes)
{
+ int traceSlicing = -1;
+
Ice::InputStreamPtr is = Ice::createInputStream(_communicator, bytes);
is->readBool(); // usesClasses
string id = is->readString();
+ const string origId = id;
+
while(!id.empty())
{
ExceptionInfoPtr info = lookupExceptionInfo(id);
@@ -978,18 +985,41 @@ IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ic
}
else
{
- is->skipSlice();
- id = is->readString();
+ if(traceSlicing == -1)
+ {
+ traceSlicing = _communicator->getProperties()->getPropertyAsInt("Ice.Trace.Slicing") > 0;
+ }
+
+ if(traceSlicing > 0)
+ {
+ _communicator->getLogger()->trace("Slicing", "unknown exception type `" + id + "'");
+ }
+
+ is->skipSlice(); // Slice off what we don't understand.
+
+ try
+ {
+ id = is->readString(); // Read type id for next slice.
+ }
+ catch(Ice::UnmarshalOutOfBoundsException& ex)
+ {
+ //
+ // When readString raises this exception it means we've seen the last slice,
+ // so we set the reason member to a more helpful message.
+ //
+ ex.reason = "unknown exception type `" + origId + "'";
+ throw;
+ }
}
}
//
// Getting here should be impossible: we can get here only if the
// sender has marshaled a sequence of type IDs, none of which we
- // have factory for. This means that sender and receiver disagree
+ // have a factory for. This means that sender and receiver disagree
// about the Slice definitions they use.
//
- throw Ice::UnknownUserException(__FILE__, __LINE__);
+ throw Ice::UnknownUserException(__FILE__, __LINE__, "unknown exception type `" + origId + "'");
}
bool
@@ -1142,6 +1172,7 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args)
}
catch(const AbortMarshaling&)
{
+ assert(PyErr_Occurred());
return 0;
}
catch(const Ice::Exception& ex)
diff --git a/py/modules/IcePy/Types.cpp b/py/modules/IcePy/Types.cpp
index 8acbde2cea8..601c176bf3f 100644
--- a/py/modules/IcePy/Types.cpp
+++ b/py/modules/IcePy/Types.cpp
@@ -543,6 +543,7 @@ IcePy::PrimitiveInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec
{
if(!writeString(p, os))
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
break;
@@ -663,6 +664,7 @@ IcePy::EnumInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap*
PyObjectHandle val = PyObject_GetAttrString(p, STRCAST("value"));
if(!val.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
if(!PyInt_Check(val.get()))
@@ -747,6 +749,7 @@ IcePy::DataMember::unmarshaled(PyObject* val, PyObject* target, void*)
{
if(PyObject_SetAttrString(target, const_cast<char*>(name.c_str()), val) < 0)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -792,7 +795,6 @@ IcePy::StructInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMa
PyObjectHandle attr = PyObject_GetAttrString(p, memberName);
if(!attr.get())
{
- PyErr_Clear();
PyErr_Format(PyExc_AttributeError, STRCAST("no member `%s' found in %s value"), memberName,
const_cast<char*>(id.c_str()));
throw AbortMarshaling();
@@ -816,6 +818,7 @@ IcePy::StructInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallb
PyObjectHandle p = type->tp_new(type, args.get(), 0);
if(!p.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -916,6 +919,7 @@ IcePy::SequenceInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Object
PyObject* item = PySequence_Fast_GET_ITEM(fastSeq.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
if(!elementType->validate(item))
@@ -967,6 +971,7 @@ IcePy::SequenceInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCal
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1063,8 +1068,8 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
}
case PrimitiveInfo::KindLong:
{
- PyErr_Format(PyExc_ValueError, STRCAST("expected sequence value"));
- throw AbortMarshaling();
+ os->writeLongSeq(reinterpret_cast<const Ice::Long*>(b), reinterpret_cast<const Ice::Long*>(b + sz));
+ break;
}
case PrimitiveInfo::KindFloat:
{
@@ -1126,6 +1131,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
int isTrue = PyObject_IsTrue(item);
@@ -1158,6 +1164,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1192,6 +1199,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1225,6 +1233,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1264,6 +1273,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1303,6 +1313,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1332,6 +1343,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1361,6 +1373,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
PyObject* item = PySequence_Fast_GET_ITEM(fs.get(), i);
if(!item)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1377,6 +1390,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje
if(!writeString(item, os))
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -1402,6 +1416,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1421,6 +1436,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = PyString_FromStringAndSize(reinterpret_cast<const char*>(p.first), sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -1429,6 +1445,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1437,6 +1454,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyInt_FromLong(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1452,6 +1470,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1460,6 +1479,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyInt_FromLong(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1474,6 +1494,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1482,6 +1503,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyInt_FromLong(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1496,6 +1518,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1504,6 +1527,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyLong_FromLongLong(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1518,6 +1542,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1526,6 +1551,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyFloat_FromDouble(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1540,6 +1566,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1548,6 +1575,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyFloat_FromDouble(p.first[i]);
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1561,6 +1589,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
result = sm->createContainer(sz);
if(!result.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1569,6 +1598,7 @@ IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, cons
PyObjectHandle item = PyString_FromStringAndSize(seq[i].c_str(), static_cast<Py_ssize_t>(seq[i].size()));
if(!item.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
sm->setItem(result.get(), i, item.get());
@@ -1668,6 +1698,141 @@ IcePy::SequenceInfo::SequenceMapping::setItem(PyObject* cont, int i, PyObject* v
}
//
+// CustomInfo implementation.
+//
+string
+IcePy::CustomInfo::getId() const
+{
+ return id;
+}
+
+bool
+IcePy::CustomInfo::validate(PyObject* val)
+{
+ return PyObject_IsInstance(val, pythonType.get()) == 1;
+}
+
+bool
+IcePy::CustomInfo::usesClasses()
+{
+ return false;
+}
+
+void
+IcePy::CustomInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap,
+ const Ice::StringSeq* metaData)
+{
+ assert(PyObject_IsInstance(p, pythonType.get()) == 1); // validate() should have caught this.
+
+ PyObjectHandle obj = PyObject_CallMethod(p, STRCAST("IsInitialized"), 0);
+ if(!obj.get())
+ {
+ throwPythonException();
+ }
+ if(!PyObject_IsTrue(obj.get()))
+ {
+ setPythonException(Ice::MarshalException(__FILE__, __LINE__, "type not fully initialized"));
+ throw AbortMarshaling();
+ }
+
+ obj = PyObject_CallMethod(p, STRCAST("SerializeToString"), 0);
+ if(!obj.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+
+ assert(PyString_Check(obj.get()));
+ const char* str = PyString_AS_STRING(obj.get());
+ Py_ssize_t sz = PyString_GET_SIZE(obj.get());
+ os->writeByteSeq(reinterpret_cast<const Ice::Byte*>(str), reinterpret_cast<const Ice::Byte*>(str + sz));
+}
+
+void
+IcePy::CustomInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target,
+ void* closure, const Ice::StringSeq* metaData)
+{
+ //
+ // Unmarshal the raw byte sequence.
+ //
+ pair<const Ice::Byte*, const Ice::Byte*> seq;
+ is->readByteSeq(seq);
+ int sz = static_cast<int>(seq.second - seq.first);
+
+ //
+ // Create a new instance of the protobuf type.
+ //
+ PyObjectHandle args = PyTuple_New(0);
+ if(!args.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+ PyTypeObject* type = reinterpret_cast<PyTypeObject*>(pythonType.get());
+ PyObjectHandle p = type->tp_new(type, args.get(), 0);
+ if(!p.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+
+ //
+ // Initialize the object.
+ //
+ PyObjectHandle obj = PyObject_CallMethod(p.get(), STRCAST("__init__"), 0, 0);
+ if(!obj.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+
+ //
+ // Convert the seq to a string.
+ //
+ obj = PyString_FromStringAndSize(reinterpret_cast<const char*>(seq.first), sz);
+ if(!obj.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+
+ //
+ // Parse the string.
+ //
+ obj = PyObject_CallMethod(p.get(), STRCAST("ParseFromString"), STRCAST("O"), obj.get(), 0);
+ if(!obj.get())
+ {
+ assert(PyErr_Occurred());
+ throw AbortMarshaling();
+ }
+
+ cb->unmarshaled(p.get(), target, closure);
+}
+
+void
+IcePy::CustomInfo::print(PyObject* value, IceUtilInternal::Output& out, PrintObjectHistory* history)
+{
+ if(!validate(value))
+ {
+ out << "<invalid value - expected " << id << ">";
+ return;
+ }
+
+ if(value == Py_None)
+ {
+ out << "{}";
+ }
+ else
+ {
+ }
+}
+
+void
+IcePy::CustomInfo::destroy()
+{
+}
+
+//
// DictionaryInfo implementation.
//
string
@@ -1734,6 +1899,7 @@ IcePy::DictionaryInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalC
PyObjectHandle p = PyDict_New();
if(!p.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1757,6 +1923,7 @@ IcePy::DictionaryInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalC
//
if(PyDict_SetItem(p.get(), keyCB->key.get(), Py_None) < 0)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
@@ -1777,6 +1944,7 @@ IcePy::DictionaryInfo::unmarshaled(PyObject* val, PyObject* target, void* closur
PyObject* key = reinterpret_cast<PyObject*>(closure);
if(PyDict_SetItem(target, key, val) < 0)
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -1899,6 +2067,7 @@ IcePy::ClassInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap
PyObjectHandle iceType = PyObject_GetAttrString(p, STRCAST("ice_type"));
if(!iceType.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
ClassInfoPtr info = ClassInfoPtr::dynamicCast(getType(iceType.get()));
@@ -2067,7 +2236,7 @@ IcePy::ProxyInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallba
if(!pythonType.get())
{
PyErr_Format(PyExc_RuntimeError, STRCAST("class %s is declared but not defined"), id.c_str());
- return;
+ throw AbortMarshaling();
}
PyObjectHandle p = createProxy(proxy, is->communicator(), pythonType.get());
@@ -2125,8 +2294,9 @@ IcePy::ObjectWriter::ice_preMarshal()
if(PyObject_HasAttrString(_object, STRCAST("ice_preMarshal")) == 1)
{
PyObjectHandle tmp = PyObject_CallMethod(_object, STRCAST("ice_preMarshal"), 0);
- if(PyErr_Occurred())
+ if(!tmp.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -2149,7 +2319,6 @@ IcePy::ObjectWriter::write(const Ice::OutputStreamPtr& os) const
PyObjectHandle val = PyObject_GetAttrString(_object, memberName);
if(!val.get())
{
- PyErr_Clear();
PyErr_Format(PyExc_AttributeError, STRCAST("no member `%s' found in %s value"), memberName,
const_cast<char*>(_info->id.c_str()));
throw AbortMarshaling();
@@ -2198,8 +2367,9 @@ IcePy::ObjectReader::ice_postUnmarshal()
if(PyObject_HasAttrString(_object, STRCAST("ice_postUnmarshal")) == 1)
{
PyObjectHandle tmp = PyObject_CallMethod(_object, STRCAST("ice_postUnmarshal"), 0);
- if(PyErr_Occurred())
+ if(!tmp.get())
{
+ assert(PyErr_Occurred());
throw AbortMarshaling();
}
}
@@ -2355,7 +2525,6 @@ IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec
PyObjectHandle val = PyObject_GetAttrString(p, memberName);
if(!val.get())
{
- PyErr_Clear();
PyErr_Format(PyExc_AttributeError, STRCAST("no member `%s' found in %s value"), memberName,
const_cast<char*>(id.c_str()));
throw AbortMarshaling();
@@ -2885,6 +3054,26 @@ IcePy_defineSequence(PyObject*, PyObject* args)
extern "C"
PyObject*
+IcePy_defineCustom(PyObject*, PyObject* args)
+{
+ char* id;
+ PyObject* type;
+ if(!PyArg_ParseTuple(args, STRCAST("sO"), &id, &type))
+ {
+ return 0;
+ }
+
+ assert(PyType_Check(type));
+
+ CustomInfoPtr info = new CustomInfo;
+ info->id = id;
+ info->pythonType = type;
+
+ return createType(info);
+}
+
+extern "C"
+PyObject*
IcePy_defineDictionary(PyObject*, PyObject* args)
{
char* id;
diff --git a/py/modules/IcePy/Types.h b/py/modules/IcePy/Types.h
index d10284f9506..cf05687ace2 100644
--- a/py/modules/IcePy/Types.h
+++ b/py/modules/IcePy/Types.h
@@ -249,6 +249,32 @@ private:
typedef IceUtil::Handle<SequenceInfo> SequenceInfoPtr;
//
+// Custom information.
+//
+class CustomInfo : public TypeInfo
+{
+public:
+
+ virtual std::string getId() const;
+
+ virtual bool validate(PyObject*);
+
+ virtual bool usesClasses();
+
+ virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, const Ice::StringSeq* = 0);
+ virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*,
+ const Ice::StringSeq* = 0);
+
+ virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*);
+
+ virtual void destroy();
+
+ std::string id;
+ PyObjectHandle pythonType;
+};
+typedef IceUtil::Handle<CustomInfo> CustomInfoPtr;
+
+//
// Dictionary information.
//
class DictionaryInfo : public TypeInfo
@@ -448,6 +474,7 @@ ExceptionInfoPtr getException(PyObject*);
extern "C" PyObject* IcePy_defineEnum(PyObject*, PyObject*);
extern "C" PyObject* IcePy_defineStruct(PyObject*, PyObject*);
extern "C" PyObject* IcePy_defineSequence(PyObject*, PyObject*);
+extern "C" PyObject* IcePy_defineCustom(PyObject*, PyObject*);
extern "C" PyObject* IcePy_defineDictionary(PyObject*, PyObject*);
extern "C" PyObject* IcePy_declareProxy(PyObject*, PyObject*);
extern "C" PyObject* IcePy_defineProxy(PyObject*, PyObject*);
diff --git a/py/modules/IcePy/Util.h b/py/modules/IcePy/Util.h
index a0fab491dbf..0780fd67f6b 100644
--- a/py/modules/IcePy/Util.h
+++ b/py/modules/IcePy/Util.h
@@ -200,9 +200,8 @@ void setPythonException(const Ice::Exception&);
void setPythonException(PyObject*);
//
-// Converts a Python exception into an Ice exception and throws it.
-// If no exception is provided, the interpreter's current exception
-// is obtained. The second argument is an optional traceback object.
+// Converts the interpreter's current exception into an Ice exception
+// and throws it.
//
void throwPythonException();
diff --git a/py/python/Ice.py b/py/python/Ice.py
index 864315974f1..9689dbabc88 100644
--- a/py/python/Ice.py
+++ b/py/python/Ice.py
@@ -28,6 +28,13 @@ generateUUID = IcePy.generateUUID
loadSlice = IcePy.loadSlice
#
+# This value is used as the default value for struct types in the constructors
+# of user-defined types. It allows us to determine whether the application has
+# supplied a value. (See bug 3676)
+#
+_struct_marker = object()
+
+#
# Core Ice types.
#
class Object(object):
diff --git a/py/test/Ice/faultTolerance/run.py b/py/test/Ice/faultTolerance/run.py
index a7d9403143f..1b4a6840bf1 100755
--- a/py/test/Ice/faultTolerance/run.py
+++ b/py/test/Ice/faultTolerance/run.py
@@ -37,8 +37,9 @@ ports = ""
for i in range(0, num):
ports = "%s %d" % (ports, base + i)
print "starting client...",
-clientProc = TestUtil.startClient(client, ports)
+clientProc = TestUtil.startClient(client, ports, startReader = False)
print "ok"
+clientProc.startReader()
clientProc.waitTestSuccess()
for p in serverProc:
diff --git a/py/test/Ice/operations/ServerAMD.py b/py/test/Ice/operations/ServerAMD.py
index a7d09dfe07f..b678605d03a 100755
--- a/py/test/Ice/operations/ServerAMD.py
+++ b/py/test/Ice/operations/ServerAMD.py
@@ -191,6 +191,12 @@ class MyDerivedClassI(Test.MyDerivedClass):
r.update(p2)
cb.ice_response(r, p3)
+ def opMyStructMyEnumD_async(self, cb, p1, p2, current=None):
+ p3 = p1.copy()
+ r = p1.copy()
+ r.update(p2)
+ cb.ice_response(r, p3)
+
def opIntS_async(self, cb, s, current=None):
cb.ice_response([-x for x in s])
diff --git a/py/test/Ice/operations/Test.ice b/py/test/Ice/operations/Test.ice
index 4fc80b45195..a69a320eeb9 100644
--- a/py/test/Ice/operations/Test.ice
+++ b/py/test/Ice/operations/Test.ice
@@ -60,11 +60,18 @@ sequence<MyClassS> MyClassSS;
sequence<StringSS> StringSSS;
+struct MyStruct
+{
+ int i;
+ int j;
+};
+
dictionary<byte, bool> ByteBoolD;
dictionary<short, int> ShortIntD;
dictionary<long, float> LongFloatD;
dictionary<string, string> StringStringD;
dictionary<string, MyEnum> StringMyEnumD;
+dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["ami"] class MyClass
{
@@ -143,6 +150,9 @@ dictionary<string, MyEnum> StringMyEnumD;
StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
out StringMyEnumD p3);
+ MyStructMyEnumD opMyStructMyEnumD(MyStructMyEnumD p1, MyStructMyEnumD p2,
+ out MyStructMyEnumD p3);
+
IntS opIntS(IntS s);
void opByteSOneway(ByteS s);
diff --git a/py/test/Ice/operations/TestAMD.ice b/py/test/Ice/operations/TestAMD.ice
index fcfd8e27c3b..528e8180fe7 100644
--- a/py/test/Ice/operations/TestAMD.ice
+++ b/py/test/Ice/operations/TestAMD.ice
@@ -58,11 +58,18 @@ sequence<MyClassS> MyClassSS;
sequence<StringSS> StringSSS;
+struct MyStruct
+{
+ int i;
+ int j;
+};
+
dictionary<byte, bool> ByteBoolD;
dictionary<short, int> ShortIntD;
dictionary<long, float> LongFloatD;
dictionary<string, string> StringStringD;
dictionary<string, MyEnum> StringMyEnumD;
+dictionary<MyStruct, MyEnum> MyStructMyEnumD;
["ami", "amd"] class MyClass
{
@@ -141,6 +148,9 @@ dictionary<string, MyEnum> StringMyEnumD;
StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2,
out StringMyEnumD p3);
+ MyStructMyEnumD opMyStructMyEnumD(MyStructMyEnumD p1, MyStructMyEnumD p2,
+ out MyStructMyEnumD p3);
+
IntS opIntS(IntS s);
void opByteSOneway(ByteS s);
diff --git a/py/test/Ice/operations/TestI.py b/py/test/Ice/operations/TestI.py
index ee595ba8532..5cf3a522b2b 100644
--- a/py/test/Ice/operations/TestI.py
+++ b/py/test/Ice/operations/TestI.py
@@ -154,6 +154,12 @@ class MyDerivedClassI(Test.MyDerivedClass):
r.update(p2)
return (r, p3)
+ def opMyStructMyEnumD(self, p1, p2, current=None):
+ p3 = p1.copy()
+ r = p1.copy()
+ r.update(p2)
+ return (r, p3)
+
def opIntS(self, s, current=None):
return [-x for x in s]
diff --git a/py/test/Ice/operations/Twoways.py b/py/test/Ice/operations/Twoways.py
index 5ae6a98b5f8..d79bd05243e 100644
--- a/py/test/Ice/operations/Twoways.py
+++ b/py/test/Ice/operations/Twoways.py
@@ -524,6 +524,33 @@ def twoways(communicator, p):
test(ro["Hello!!"] == Test.MyEnum.enum2)
#
+ # opMyStructMyEnumD
+ #
+ s11 = Test.MyStruct()
+ s11.i = 1
+ s11.j = 1
+ s12 = Test.MyStruct()
+ s12.i = 1
+ s12.j = 2
+ s22 = Test.MyStruct()
+ s22.i = 2
+ s22.j = 2
+ s23 = Test.MyStruct()
+ s23.i = 2
+ s23.j = 3
+ di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
+ di2 = {s11: Test.MyEnum.enum1, s22: Test.MyEnum.enum3, s23: Test.MyEnum.enum2}
+
+ ro, do = p.opMyStructMyEnumD(di1, di2)
+
+ test(do == di1)
+ test(len(ro) == 4)
+ test(ro[s11] == Test.MyEnum.enum1)
+ test(ro[s12] == Test.MyEnum.enum2)
+ test(ro[s22] == Test.MyEnum.enum3)
+ test(ro[s23] == Test.MyEnum.enum2)
+
+ #
# opIntS
#
lengths = ( 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 )
diff --git a/py/test/Ice/operations/TwowaysAMI.py b/py/test/Ice/operations/TwowaysAMI.py
index e0ceac2fddf..295a2051989 100644
--- a/py/test/Ice/operations/TwowaysAMI.py
+++ b/py/test/Ice/operations/TwowaysAMI.py
@@ -472,6 +472,35 @@ class AMI_MyClass_opStringMyEnumDI(CallbackBase):
def ice_exception(self, ex):
test(False)
+class AMI_MyClass_opMyStructMyEnumDI(CallbackBase):
+ def __init__(self):
+ CallbackBase.__init__(self)
+
+ def ice_response(self, ro, do):
+ s11 = Test.MyStruct()
+ s11.i = 1
+ s11.j = 1
+ s12 = Test.MyStruct()
+ s12.i = 1
+ s12.j = 2
+ s22 = Test.MyStruct()
+ s22.i = 2
+ s22.j = 2
+ s23 = Test.MyStruct()
+ s23.i = 2
+ s23.j = 3
+ di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
+ test(do == di1)
+ test(len(ro) == 4)
+ test(ro[s11] == Test.MyEnum.enum1)
+ test(ro[s12] == Test.MyEnum.enum2)
+ test(ro[s22] == Test.MyEnum.enum3)
+ test(ro[s23] == Test.MyEnum.enum2)
+ self.called()
+
+ def ice_exception(self, ex):
+ test(False)
+
class AMI_MyClass_opIntSI(CallbackBase):
def __init__(self, l):
CallbackBase.__init__(self)
@@ -769,6 +798,28 @@ def twowaysAMI(communicator, p):
test(cb.check())
#
+ # opMyStructMyEnumD
+ #
+ s11 = Test.MyStruct()
+ s11.i = 1
+ s11.j = 1
+ s12 = Test.MyStruct()
+ s12.i = 1
+ s12.j = 2
+ s22 = Test.MyStruct()
+ s22.i = 2
+ s22.j = 2
+ s23 = Test.MyStruct()
+ s23.i = 2
+ s23.j = 3
+ di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2}
+ di2 = {s11: Test.MyEnum.enum1, s22: Test.MyEnum.enum3, s23: Test.MyEnum.enum2}
+
+ cb = AMI_MyClass_opMyStructMyEnumDI()
+ p.opMyStructMyEnumD_async(cb, di1, di2)
+ test(cb.check())
+
+ #
# opIntS
#
lengths = ( 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 )
diff --git a/py/test/Ice/protobuf/AllTests.py b/py/test/Ice/protobuf/AllTests.py
new file mode 100644
index 00000000000..566179a7db9
--- /dev/null
+++ b/py/test/Ice/protobuf/AllTests.py
@@ -0,0 +1,75 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import Ice, Test, threading
+from Test_pb2 import Message
+
+def test(b):
+ if not b:
+ raise RuntimeError('test assertion failed')
+
+class CallbackBase:
+ def __init__(self):
+ self._called = False
+ self._cond = threading.Condition()
+
+ def called(self):
+ self._cond.acquire()
+ self._called = True
+ self._cond.notify()
+ self._cond.release()
+
+ def check(self):
+ self._cond.acquire()
+ while not self._called:
+ self._cond.wait(5.0)
+ self._called = False
+ return True
+
+class AMI_MyClass_opMessageI(CallbackBase):
+ def ice_response(self, r, o):
+ test(o.i == 99);
+ test(r.i == 99);
+ self.called()
+
+ def ice_exception(self, ex):
+ test(False)
+
+def allTests(communicator, collocated):
+ sref = "test:default -p 12010 -t 10000"
+ obj = communicator.stringToProxy(sref)
+ test(obj != None)
+
+ cl = Test.MyClassPrx.checkedCast(obj)
+ test(cl != None)
+
+ print "testing twoway operations... ",
+ i = Message()
+ i.i = 99
+
+ r, o = cl.opMessage(i);
+ test(o.i == 99);
+ test(r.i == 99);
+
+ r, o = cl.opMessageAMD(i);
+ test(o.i == 99);
+ test(r.i == 99);
+ print "ok"
+
+ print "testing twoway AMI operations... ",
+ cb = AMI_MyClass_opMessageI()
+ cl.opMessage_async(cb, i)
+ cb.check()
+
+ cb = AMI_MyClass_opMessageI()
+ cl.opMessageAMD_async(cb, i)
+ cb.check()
+ print "ok"
+
+ return cl
diff --git a/py/test/Ice/protobuf/Client.py b/py/test/Ice/protobuf/Client.py
new file mode 100755
index 00000000000..070df3ac032
--- /dev/null
+++ b/py/test/Ice/protobuf/Client.py
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys, traceback
+
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "python", "Ice.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+#
+# Get Slice directory.
+#
+slice_dir = os.path.join(os.path.join(toplevel, "..", "slice"))
+if not os.path.exists(slice_dir):
+ print sys.argv[0] + ': Slice directory not found.'
+ sys.exit(1)
+
+import Ice
+Ice.loadSlice('-I' + slice_dir + ' Test.ice')
+import AllTests
+
+def test(b):
+ if not b:
+ raise RuntimeError('test assertion failed')
+
+def run(args, communicator):
+ myClass = AllTests.allTests(communicator, False)
+ myClass.shutdown()
+
+ return True
+
+try:
+ initData = Ice.InitializationData()
+ initData.properties = Ice.createProperties(sys.argv)
+ communicator = Ice.initialize(sys.argv, initData)
+ status = run(sys.argv, communicator)
+except:
+ traceback.print_exc()
+ status = False
+
+if communicator:
+ try:
+ communicator.destroy()
+ except:
+ traceback.print_exc()
+ status = False
+
+sys.exit(not status)
diff --git a/py/test/Ice/protobuf/Server.py b/py/test/Ice/protobuf/Server.py
new file mode 100755
index 00000000000..9caa59fd1f7
--- /dev/null
+++ b/py/test/Ice/protobuf/Server.py
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys, traceback, time, threading
+
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "python", "Ice.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+import Ice
+
+#
+# Get Slice directory.
+#
+slice_dir = os.path.join(os.path.join(toplevel, "..", "slice"))
+if not os.path.exists(slice_dir):
+ print sys.argv[0] + ': Slice directory not found.'
+ sys.exit(1)
+
+Ice.loadSlice('-I' + slice_dir + ' Test.ice')
+import Test
+from Test_pb2 import Message
+
+class MyClassI(Test.MyClass):
+ def opMessage(self, m, current=None):
+ return (m, m)
+
+ def opMessageAMD_async(self, cb, m, current=None):
+ cb.ice_response(m, m);
+
+ def shutdown(self, current=None):
+ current.adapter.getCommunicator().shutdown()
+
+def run(args, communicator):
+ communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp")
+ adapter = communicator.createObjectAdapter("TestAdapter")
+ adapter.add(MyClassI(), communicator.stringToIdentity("test"))
+ adapter.activate()
+ communicator.waitForShutdown()
+ return True
+
+try:
+ initData = Ice.InitializationData()
+ initData.properties = Ice.createProperties(sys.argv)
+ communicator = Ice.initialize(sys.argv, initData)
+ status = run(sys.argv, communicator)
+except:
+ traceback.print_exc()
+ status = False
+
+if communicator:
+ try:
+ communicator.destroy()
+ except:
+ traceback.print_exc()
+ status = False
+
+sys.exit(not status)
diff --git a/py/test/Ice/protobuf/Test.ice b/py/test/Ice/protobuf/Test.ice
new file mode 100644
index 00000000000..bb234d349c8
--- /dev/null
+++ b/py/test/Ice/protobuf/Test.ice
@@ -0,0 +1,54 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+module Test
+{
+
+["python:protobuf:Test_pb2.Message"] sequence<byte> Message;
+
+["ami"] class MyClass
+{
+ void shutdown();
+
+ Message opMessage(Message i, out Message o);
+
+ ["amd"] Message opMessageAMD(Message i, out Message o);
+};
+
+// Remaining type definitions are there to verify that the generated
+// code compiles correctly.
+
+sequence<Message> SLS;
+sequence<SLS> SLSS;
+dictionary<int, Message> SLD;
+dictionary<int, SLS> SLSD;
+struct Foo
+{
+ Message SLmem;
+ SLS SLSmem;
+};
+
+exception Bar
+{
+ Message SLmem;
+ SLS SLSmem;
+};
+
+class Baz
+{
+ Message SLmem;
+ SLS SLSmem;
+};
+
+};
+
+#endif
diff --git a/py/test/Ice/protobuf/Test.proto b/py/test/Ice/protobuf/Test.proto
new file mode 100644
index 00000000000..fea4c801ddd
--- /dev/null
+++ b/py/test/Ice/protobuf/Test.proto
@@ -0,0 +1,16 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package test;
+
+option java_outer_classname = "TestPB";
+
+message Message {
+ required int32 i = 1;
+}
diff --git a/py/test/Ice/protobuf/run.py b/py/test/Ice/protobuf/run.py
new file mode 100755
index 00000000000..cc2ad23e79d
--- /dev/null
+++ b/py/test/Ice/protobuf/run.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+
+path = [ ".", "..", "../..", "../../..", "../../../.." ]
+head = os.path.dirname(sys.argv[0])
+if len(head) > 0:
+ path = [os.path.join(head, p) for p in path]
+path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
+if len(path) == 0:
+ raise "can't find toplevel directory!"
+sys.path.append(os.path.join(path[0]))
+from scripts import *
+
+if os.system("protoc --python_out=. Test.proto") != 0:
+ print "failed to compile Test.proto"
+ sys.exit(1)
+
+TestUtil.clientServerTest()
+
+# Remove generated protobuf files.
+if os.path.exists("Test_pb2.py"):
+ os.unlink("Test_pb2.py")
+if os.path.exists("Test_pb2.pyc"):
+ os.unlink("Test_pb2.pyc")
diff --git a/py/test/Slice/keyword/Key.ice b/py/test/Slice/keyword/Key.ice
index 74b2d51bbfe..e5d268cbffe 100644
--- a/py/test/Slice/keyword/Key.ice
+++ b/py/test/Slice/keyword/Key.ice
@@ -31,6 +31,7 @@ module and
class for
{
+ int lambda;
["ami"] void foo(exec* from, out int global);
};
diff --git a/py/test/Slice/keyword/run.py b/py/test/Slice/keyword/run.py
index f36d746e167..6722947e90c 100755
--- a/py/test/Slice/keyword/run.py
+++ b/py/test/Slice/keyword/run.py
@@ -21,6 +21,7 @@ sys.path.append(os.path.join(path[0]))
from scripts import *
print "starting client...",
-clientProc = TestUtil.startClient("Client.py", "--Ice.Default.Host=127.0.0.1")
+clientProc = TestUtil.startClient("Client.py", "--Ice.Default.Host=127.0.0.1", startReader = False)
print "ok"
+clientProc.startReader()
clientProc.waitTestSuccess()