diff options
Diffstat (limited to 'python')
96 files changed, 2538 insertions, 4173 deletions
diff --git a/python/BuildInstructionsLinuxOSX.md b/python/BuildInstructionsLinuxOSX.md index f49d52db7d5..dad1e2ef772 100644 --- a/python/BuildInstructionsLinuxOSX.md +++ b/python/BuildInstructionsLinuxOSX.md @@ -18,25 +18,18 @@ Ice for Python supports Python versions 2.6, 2.7, and 3.5. Note however that your Python installation must have been built with a C++ compiler that is compatible with the one used to build Ice for C++. -### Ice Development Kit +## Building the Python Extension -You will need the Ice development kit for C++, which you can install as a binary -distribution or compile from source yourself. +The build of Ice for Python requires to first build Ice for C++ in the `cpp` +subdirectory. -## Building the Python Extension +Edit `config/Make.rules` to establish your build configuration. The comments in +the file provide more information. Change to the Ice for Python source subdirectory: $ cd python -If you have not built Ice for C++ in the `cpp` subdirectory, set `ICE_HOME` to -the directory of your Ice for C++ installation. For example: - - $ export ICE_HOME=/opt/Ice - -Edit `config/Make.rules`, modify the installation prefix (if necessary), and -review the comments describing the `PYTHON_VERSION` variable. - Execute `python -V` to verify that the correct Python interpreter is in your executable search path. @@ -63,4 +56,4 @@ If everything worked out, you should see lots of `ok` messages. In case of a failure, the tests abort with `failed`. [1]: https://zeroc.com/download.html -[2]: https://doc.zeroc.com/display/Ice36/Supported+Platforms+for+Ice+3.6.2 +[2]: https://doc.zeroc.com/display/Ice37/Supported+Platforms+for+Ice+3.7.0 diff --git a/python/BuildInstructionsWindows.md b/python/BuildInstructionsWindows.md index 571d0e9cf6c..21e3630db9c 100644 --- a/python/BuildInstructionsWindows.md +++ b/python/BuildInstructionsWindows.md @@ -12,53 +12,81 @@ Ice for Python is expected to build and run properly on Windows and was extensively tested using the operating systems and compiler versions listed for our [supported platforms][2]. +The build requires the [Ice Builder for Visual Studio][8], you must install +version 4.2.0 or greater to build Ice. + ### Python Versions -Ice for Python supports Python versions 2.6, 2.7, and 3.5. Note however that -your Python installation must have been built with a C++ compiler that is +Ice for Python supports Python versions 2.6, 2.7, 3.3, 3.4 or 3.5. Note however +that your Python installation must have been built with a C++ compiler that is compatible with the one used to build Ice for C++. -### Ice Development Kit - -You will need the Ice development kit for C++, which you can install as a binary -distribution or compile from source yourself. - ## Building the Python Extension The Python interpreter is readily available on Windows platforms. You can build it yourself using Microsoft Visual C++, or obtain a binary distribution from the Python web site. The Python 3.5.x binary distribution is compiled with Visual -C++ 14, Python 3.4.x and Python 2.7.x are compiled with Visual C++ 10, you should -compile the Ice extension with the same Visual C++ version that your Python binary -distribution was compiled. +C++ 14, Python 3.4.x and Python 2.7.x are compiled with Visual C++ 10, you +should compile the Ice extension with the same Visual C++ version that your +Python binary distribution was compiled. -Open a command prompt that supports command-line compilation with Visual C++. -For example, you can execute the Visual C++ batch file `vcvars32.bat` to -configure your environment. Alternatively, you can start a Visual Studio Command -Prompt by selecting the appropriate entry from the Visual Studio program group -in your Start menu. +Using the first configurations produces 32-bit binaries, while the second +configurations produce 64-bit binaries. Change to the Ice for Python source subdirectory: > cd python -If you have not built Ice for C++ from the `cpp` subdirectory, set `ICE_HOME` -to the directory of your Ice for C++ installation. For example: +You must built Ice for C++ from the `cpp` subdirectory, if you have not done so +review cpp\BuildInstructionsWindows.md first. + +Building the extension: + + > MSbuild msbuild\ice.proj + +This will build the extension in `Release` configuration and using the command +prompt default platform, for `x64` platform the extension will be placed in +`python\x64\Release\IcePy.pyd` and for `Win32` platform the extension will be +paced in `python\Win32\Release\IcePy.pyd`. + +If you want to build a debug version of the extension you can to so by setting +the MSBuild `Configuration` property to `Debug`: + + > MSbuild msbuild\ice.proj /p:Configuration=Debug - > set ICE_HOME=C:\Ice +The debug version of the extension for `x64` platform will be placed in +`python\x64\Debug\IcePy_d.pyd` and for `Win32` platform it will be placed in +`python\Win32\Debug\IcePy_d.pyd`. -Edit `config\Make.rules.mak` and review the settings. In particular you must set -`CPP_COMPILER` to the appropriate compiler. +> *For Debug builds a debug version of the Python interpreter must be installed.* -Run nmake: +The supported values for the `Configuration` property are `Debug` and `Release`. - > nmake /f Makefile.mak +If you wan to build the extension for other platform that the command prompt +default platform, you need to set the MSbuild `Platform` property, the supported +values for this property are `Win32` and `x64`. -Upon completion, the Ice extension is created as `python\IcePy.pyd`. +The following command will build the extension `x64` platform binaries with +`Release` configuration: -> *Normally you should build with `OPTIMIZE=yes`. If you wish to build a debug -version of the Ice extension, set `OPTIMIZE=no`. In this case, you will also -need to build a debug version of the Python interpreter from sources.* + > MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=x64 + +And the next command will build the extension `Win32` platform binaries with +`Release` configuration: + + > MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=Win32 + +> *When using the MSBuild Platform property the build platform doesn't depend on +the command prompt default platform* + +The build will use a default Python location defined in +`python\msbuild\ice.props`, it can be override by setting the `PythonHome` +MSBuild property. + +The following command will use Python installation from `C:\Python35-AMD64` +instead of the default location: + + > MSbuild msbuild\ice.proj /p:Configuration=Release /p:Platform=x64 /p:PythonHome=C:\Python35-AMD64 ## Configuring your Environment for Python @@ -69,16 +97,17 @@ setting the `PYTHONPATH` environment variable to contain the necessary subdirectory. For example, if the Ice for Python extension is installed in `C:\Ice`, you could configure your environment as follows: - > set PYTHONPATH=C:\Ice\python + > set PYTHONPATH=C:\Ice\python;C:\Ice\python\Win32\Release + ## Running the Python Tests After a successful build, you can run the tests as follows: - $ python allTests.py + $ python allTests.py --mode=Release --x86 If everything worked out, you should see lots of `ok` messages. In case of a failure, the tests abort with `failed`. [1]: https://zeroc.com/download.html -[2]: https://doc.zeroc.com/display/Ice36/Supported+Platforms+for+Ice+3.6.2 +[2]: https://doc.zeroc.com/display/Ice37/Supported+Platforms+for+Ice+3.7.0 diff --git a/python/Makefile b/python/Makefile index c97dfb8e75f..8e28b6594c4 100644 --- a/python/Makefile +++ b/python/Makefile @@ -7,31 +7,35 @@ # # ********************************************************************** -top_srcdir = . +top_srcdir := .. +lang_srcdir := $(top_srcdir)/python include $(top_srcdir)/config/Make.rules -SUBDIRS = modules python +# +# Load C++ dependencies +# +$(eval $(call load-dependencies,$(addprefix $(top_srcdir)/cpp/src/,Ice IceSSL))) -INSTALL_SUBDIRS = $(install_pythondir) $(install_libdir) +# +# Load python rules after loading C++ dependencies +# +include $(lang_srcdir)/config/Make.rules -install:: install-common - @for subdir in $(INSTALL_SUBDIRS); \ - do \ - if test ! -d $(DESTDIR)$$subdir ; \ - then \ - echo "Creating $(DESTDIR)$$subdir..." ; \ - mkdir -p $(DESTDIR)$$subdir ; \ - chmod a+rx $(DESTDIR)$$subdir ; \ - fi ; \ - done +# +# Load Makefile.mk fragments +# +include $(shell find $(lang_srcdir) -name Makefile.mk) -$(EVERYTHING):: - @for subdir in $(SUBDIRS); \ - do \ - echo "making $@ in $$subdir"; \ - ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ - done +# +# Make the projects (this expands all the build configuration and defines rules for all +# the components). +# +$(call make-projects,$(projects)) -test:: - @python $(top_srcdir)/allTests.py +# +# We use a separate Makefile for building the python packages because their building +# requires .NOTPARALLEL +# +all generate-srcs clean distclean install:: + +$(Q)$(MAKE) -C python $@ diff --git a/python/Makefile.mak b/python/Makefile.mak deleted file mode 100644 index 0323c32f708..00000000000 --- a/python/Makefile.mak +++ /dev/null @@ -1,32 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = . - -!include $(top_srcdir)\config\Make.rules.mak - -SUBDIRS = modules python - -install:: install-common - @if not exist "$(install_pythondir)" \ - @echo "Creating $(install_pythondir)..." && \ - $(MKDIR) "$(install_pythondir)" - -$(EVERYTHING_EXCEPT_INSTALL):: - @for %i in ( $(SUBDIRS) ) do \ - @echo "making $@ in %i" && \ - cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1 - -install:: - @for %i in ( modules python ) do \ - @echo "making $@ in %i" && \ - cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1 - -test:: - @python $(top_srcdir)/allTests.py diff --git a/python/config/Ice.Python.props b/python/config/Ice.Python.props new file mode 100644 index 00000000000..3a617ef81e4 --- /dev/null +++ b/python/config/Ice.Python.props @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(Configuration)' == ''"> + <Configuration>Debug</Configuration> + </PropertyGroup> + <Import Project="$(MSBuildThisFileDirectory)..\..\cpp\config\ice.cpp.props" /> +</Project> diff --git a/python/config/Make.rules b/python/config/Make.rules index ee50143e17b..d24b42c7227 100644 --- a/python/config/Make.rules +++ b/python/config/Make.rules @@ -8,193 +8,89 @@ # ********************************************************************** # -# Select an installation base directory. The directory will be created -# if it does not exist. +# If multiple versions of Python are installed and you want a specific +# version to be used for building the Ice extension, set PYTHON to the +# location of the python interpreter. # -prefix ?= /opt/Ice-$(VERSION) +PYTHON ?= python -# -# The "root directory" for runpath embedded in executables. Can be set -# to change the runpath added to Ice executables. The default is -# platform dependent (Linux only, on OS X the embedded runpath is always -# based on @loader_path). -# -#embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR) +# ---------------------------------------------------------------------- +# Don't change anything below this line! +# ---------------------------------------------------------------------- -# -# Define embedded_runpath as no if you don't want any RPATH added to -# the executables (Linux only, on OS X we always add a runpath). -# -embedded_runpath ?= yes +-include $(lang_srcdir)/config/Make.rules.$(os) -# -# Define OPTIMIZE as yes if you want to build with optimization. -# Otherwise the Ice extension is built with debug information. -# +python-call = $(shell $(PYTHON) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write($1)") -#OPTIMIZE = yes +PYTHON_VERSION ?= python$(PYTHON_BASE_VERSION) +PYTHON_BASE_VERSION ?= $(call python-call,ds.get_python_version()) +PYTHON_INCLUDE_DIR ?= $(call python-call,ds.get_python_inc()) +PYTHON_LIB_DIR ?= $(call python-call,ds.get_config_var('LIBPL')) +PYTHON_LIB_SUFFIX ?= $(call python-call,sys.__dict__['abiflags'] if 'abiflags' in sys.__dict__ else '') +PYTHON_LIB_NAME ?= $(PYTHON_VERSION)$(PYTHON_LIB_SUFFIX) -# -# Define LP64 as yes if you want to build in 64 bit mode on a platform -# that supports both 32 and 64 bit. -# -#LP64 := yes +python_cppflags := -I$(PYTHON_INCLUDE_DIR) +python_ldflags := -L$(PYTHON_LIB_DIR) -l$(PYTHON_LIB_NAME) # -# The values below can be overridden by defining them as environment -# variables. +# Python installation directory # +install_pythondir = $(if $(usr_dir_install),$(shell $(PYTHON) $(lang_srcdir)/config/install_dir),$(prefix)/python) # -# If multiple versions of Python are installed and you want a specific -# version used for building the Ice extension, then set PYTHON to -# the specific to the location of the python interpreter. +# Rules to build a python module. We just compute the name of the python module +# and delegate to make-shared-module. # -PYTHON ?= python - -PYTHON_VERSION ?= python$(shell $(PYTHON) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_python_version())") - -PYTHON_BASE_VERSION ?= $(shell $(PYTHON) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_python_version())") +mkpymodulename ?= $(patsubst lib%,%,$(call mkshlibname,$(1))) +make-shared-python-module = $(call make-shared-module,$(call mkpymodulename,$1),$2,$3,$4,$5,$6,$7,$8,$9) +get-shared-python-module-targets = $(call get-shared-module-targets,$(call mkpymodulename,$1),$2,$3,$4) +install-shared-python-module = $(call install-shared-module,$(call mkpymodulename,$1),$2,$3,$4,$5) -PYTHON_INCLUDE_DIR ?= $(shell $(PYTHON) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_python_inc())") +$(DESTDIR)$(install_pythondir): + $(Q)$(MKDIR) -p $@ +installdirs += $(install_pythondir) -PYTHON_LIB_DIR ?= $(shell $(PYTHON) -c "import sys; import distutils.sysconfig as ds; sys.stdout.write(ds.get_config_var('LIBPL'))") - -PYTHON_LIB_SUFFIX ?= $(shell $(PYTHON) -c "import sys; sys.stdout.write(sys.__dict__['abiflags'] if 'abiflags' in sys.__dict__ else '')") - -PYTHON_LIB_NAME ?= $(PYTHON_VERSION)$(PYTHON_LIB_SUFFIX) - -PYTHON_FLAGS ?= -I$(PYTHON_INCLUDE_DIR) -PYTHON_LIBS ?= -L$(PYTHON_LIB_DIR) -l$(PYTHON_LIB_NAME) - -# -# The build architectures for gcc based builds. The format of these -# build flags are OS dependent. For example, under OS X to build -# binaries which support both i386 and x86_64 you would use "-arch -# i386 -arch x86_64". The default is OS version dependent. Be aware -# that this value may conflict with the setting of LP64 above. # -#CXXARCHFLAGS = -arch i386 -arch x86_64 - -# ---------------------------------------------------------------------- -# Don't change anything below this line! -# ---------------------------------------------------------------------- - +# $(call make-python-package,$1=slicedir,$2=generateddir,$3=package,$4=sliceflags) # -# Common definitions +# Compile slice files from $(slicedir)/<package> to python/<package>. # -ice_language = python -ice_require_cpp = yes +define make-python-package -ifeq ($(shell test -f $(top_srcdir)/config/Make.common.rules && echo 0),0) - include $(top_srcdir)/config/Make.common.rules -else - include $(top_srcdir)/../config/Make.common.rules -endif +$2/$3/.depend/%.ice.d: | $2/$3/.depend ; -install_bindir = $(prefix)/$(binsubdir) +$2/$3/.depend: + $(Q)$(MKDIR) -p $$@ -# -# Platform specific definitions -# -ifeq ($(shell test -f $(top_srcdir)/config/Make.rules.$(UNAME) && echo 0),0) - include $(top_srcdir)/config/Make.rules.$(UNAME) -else - include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME) -endif +.PRECIOUS: $2/$3/.depend/%.ice.d -libdir = $(top_srcdir)/python - -ifndef usr_dir_install - install_pythondir = $(prefix)/python - install_libdir = $(prefix)/python -else - # - # The install_dir script says where python wants site-packages installed. - # - install_pythondir = $(shell $(PYTHON) $(top_srcdir)/config/install_dir) - install_libdir = $(install_pythondir) +ifeq ($(filter %clean,$(MAKECMDGOALS)),) + # Include the dependencies + -include $(addprefix $2/.depend/,$(call source-to-dependency,$(wildcard $1/$3/*.ice))) endif -ifeq ($(UNAME),SunOS) - ifeq ($(LP64),yes) - libdir = $(top_srcdir)/python$(lp64suffix) - install_libdir = $(prefix)/python$(lp64suffix) - endif -endif +$$(eval $$(call make-python-slice,$1,$2,$3,,$4)) -ifdef ice_src_dist - ICE_LIB_DIR = -L$(ice_cpp_dir)/$(libsubdir) - ICE_FLAGS = -I$(ice_cpp_dir)/include -else - ICE_LIB_DIR = -L$(ice_dir)/$(libsubdir) - ICE_FLAGS = -I$(ice_dir)/include -endif -ICE_LIBS = $(ICE_LIB_DIR) -lIceSSL -lIce -lSlice -lIceUtil +distclean clean:: + $(E) "Cleaning package $3" + $(Q)$(RM) -r $2/$3/.depend + $(Q)$(if $(findstring --no-package,$4),,$(RM) $2/$3/.__init__.py) + $(Q)$(RM) $(patsubst $1/$3/%.ice,$2/$3_%_ice.py,$(wildcard $1/$3/*.ice)) -CPPFLAGS = -ICECPPFLAGS = -I$(slicedir) -SLICE2PYFLAGS = $(ICECPPFLAGS) -LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) +generate-srcs srcs all:: $(patsubst $1/$3/%.ice,$2/$3_%_ice.py,$(wildcard $1/$3/*.ice)) -ifeq ($(MAKEDEPENDFLAGS),) - MAKEDEPENDFLAGS := -MMD -endif +$$(eval $$(call install-data-files,$(patsubst $1/$3/%.ice,$2/$3_%_ice.py,$(wildcard $1/$3/*.ice)),$2,$(install_pythondir),install)) -ifdef ice_src_dist - SLICE2PY = $(PYTHON) $(top_srcdir)/config/s2py.py - SLICEPARSERLIB = $(ice_cpp_dir)/$(libsubdir)/$(call mklibfilename,Slice,$(VERSION)) - ifeq ($(wildcard $(SLICEPARSERLIB)),) - SLICEPARSERLIB = $(ice_cpp_dir)/$(lib64subdir)/$(call mklibfilename,Slice,$(VERSION)) - endif -else - ifeq ($(UNAME),Darwin) - SLICE2PY = /usr/local/bin/slice2py - else - SLICE2PY = $(shell $(PYTHON) -c "import os, sys, slice2py; sys.stdout.write(os.path.normpath(os.path.join(slice2py.__file__, '..', '..', '..', '..', 'bin', 'slice2py')))") - endif - SLICEPARSERLIB = -endif +endef # -# A Python extension library cannot have a "lib" prefix, so Python-specific -# functions are defined that strip "lib" from the regular library name. +# $(call make-python-slice,$1=slicedir,$2=generateddir,$3=package,$4=file,$5=sliceflags) # -ifndef mkpylibfilename - mkpylibfilename = $(subst dy,dylib,$(subst lib,,$(call mklibfilename,$(1),$(2)))) -endif -ifndef mkpysoname - mkpysoname = $(subst dy,dylib,$(subst lib,,$(call mksoname,$(1),$(2)))) -endif -ifndef mkpylibname - mkpylibname = $(subst dy,dylib,$(subst lib,,$(call mklibname,$(1)))) -endif - -EVERYTHING = all depend clean install - -.SUFFIXES: -.SUFFIXES: .cpp .o .py - -all:: $(SRCS) - -%_ice.py: $(slicedir)/%.ice - rm -f $(*F).py - $(SLICE2PY) $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) $(SLICE2PYFLAGS) $< > .depend/$(*F).ice.d - -.cpp.o: - @mkdir -p .depend - $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(MAKEDEPENDFLAGS) $< -MF .depend/$(*F).d - -clean:: - -rm -f $(TARGETS) - -rm -f core *.o *.pyc *.bak - -rm -rf __pycache__ - -rm -rf .depend - -all:: $(SRCS) $(TARGETS) +define make-python-slice -include $(wildcard .depend/*.d) +$2/$3_$(or $4,%)_ice.py: $1/$3/$(or $4,%).ice $2/$3/.depend/$(or $4,%).ice.d $(slice2py_path) + $(E) "Compiling $$<" + $(Q)$(slice2py_path) -I$1 --ice --output-dir $2 $5 --depend $$< > $2/$3/.depend/$(or $4,$$(*F)).ice.d + $(Q)$(slice2py_path) -I$1 --ice --output-dir $2 --prefix $3_ --checksum $5 $$< -install:: +endef diff --git a/python/config/Make.rules.AIX b/python/config/Make.rules.AIX index 71e616a0384..728ec6379d2 100644 --- a/python/config/Make.rules.AIX +++ b/python/config/Make.rules.AIX @@ -7,19 +7,6 @@ # # ********************************************************************** -# -# This file is itself included by Make.rules -# - -include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME) - -# -# Need .so for Python extension -# -# Note: Python also loads the extension in IcePy.a if IcePy.so points to it -# - -mkpylibfilename = $(1).so -mkylibname = $(1).so +# $(call mkshlib,$1=target,$2=objects,$3=libname,$4=version,$5=soversion,$6=ldflags,$7=platform) +mkshlib = $(or $($7_cxx),$(CXX)) -qmkshrobj -o $1 $2 $6 -mkshlib = $(CXX) -qmkshrobj $(LDFLAGS) -o $(1) $(3) $(4) diff --git a/python/config/Make.rules.Darwin b/python/config/Make.rules.Darwin deleted file mode 100644 index f75dd963278..00000000000 --- a/python/config/Make.rules.Darwin +++ /dev/null @@ -1,48 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -# -# This file is included by Make.rules when uname is Darwin. -# - -include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME) - -shlibldflags += $(LDEXEFLAGS) - -mksoname = $(if $(2),lib$(1).$(2).so,lib$(1).so) -mklibname = lib$(1).so - -mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4) - -ifneq ($(STATICLIBS),yes) - # - # Set RPATH to the cpp/lib directory or Ice installation lib directory. Note that unlike Linux - # platforms, we always set the RPATH for source builds on OS X. This is required because we - # can no longer rely on DYLD_LIBRARY_PATH on El Capitan. The RPATH is updated when the library - # is installed (see cpp/config/Make.rules.Darwin). - # - ifdef ice_src_dist - RPATH_DIR = @loader_path/../../cpp/$(libsubdir) - else - RPATH_DIR = $(ice_dir)/$(libsubdir) - endif - - # - # Update the RPATH to the installation lib directory when installing a library instead - # of relying on the RPATH set during the build (which isn't correct anymore for the - # installation directly layout). - # - ifneq ($(embedded_runpath_prefix),) - installlib += ; install_name_tool -rpath $(RPATH_DIR) $(embedded_runpath_prefix)/lib $(1)/$(3) - else ifdef usr_dir_install - installlib += ; install_name_tool -delete_rpath $(RPATH_DIR) $(1)/$(3) - else ifdef ice_src_dist - installlib += ; install_name_tool -rpath $(RPATH_DIR) @loader_path/../$(libsubdir) $(1)/$(3) - endif -endif diff --git a/python/config/Make.rules.Linux b/python/config/Make.rules.Linux deleted file mode 100644 index baf7eac507f..00000000000 --- a/python/config/Make.rules.Linux +++ /dev/null @@ -1,27 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -# -# This file is itself included by Make.rules -# - -include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME) - -ifeq ($(CXX),g++) - ifeq ($(OPTIMIZE),yes) - # - # Necessary to avoid warnings for Python < 3.x - # - ifneq ($(findstring $(PYTHON_BASE_VERSION),2.6 2.7),) - CXXFLAGS += -fno-strict-aliasing - endif - endif -endif - -mkshlib = $(CXX) -shared $(LDFLAGS) $(LDEXEFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread diff --git a/python/config/Make.rules.mak b/python/config/Make.rules.mak deleted file mode 100644 index 29f2231fa75..00000000000 --- a/python/config/Make.rules.mak +++ /dev/null @@ -1,151 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -# -# Select an installation base directory. The directory will be created -# if it does not exist. -# - -!if "$(PREFIX)" == "" -prefix = C:\Ice-$(VERSION) -!else -prefix = $(PREFIX) -!endif - -# -# Define OPTIMIZE as yes if you want to build with optimization. -# Otherwise the Ice extension is built with debug information. -# - -OPTIMIZE = yes - -# -# Specify your C++ compiler, or leave unset for auto-detection. The -# only value currently supported to build IcePy is VC100. -# -#CPP_COMPILER = VCxxx - -# -# Set PYTHON_HOME to your Python installation directory. -# -!if "$(PYTHON_HOME)" == "" -PYTHON_HOME = C:\Python34 -!endif - -# ---------------------------------------------------------------------- -# Don't change anything below this line! -# ---------------------------------------------------------------------- - -# -# Common definitions -# -ice_language = python -ice_require_cpp = yes - -!if exist ($(top_srcdir)\..\config\Make.common.rules.mak) -!include $(top_srcdir)\..\config\Make.common.rules.mak -!else -!include $(top_srcdir)\config\Make.common.rules.mak -!endif - -libdir = $(top_srcdir)\python -install_pythondir = $(prefix)\python$(x64suffix) -install_libdir = $(prefix)\python$(x64suffix) - -!include $(top_srcdir)\..\cpp\config\Make.rules.msvc - -libsuff = $(x64suffix) - -!if "$(OPTIMIZE)" != "yes" -LIBSUFFIX = $(LIBSUFFIX)d -PYLIBSUFFIX = _$(LIBSUFFIX) -RCFLAGS = -D_DEBUG -!endif - -# -# Import libraries are located automatically -# -ICE_LIBS = - -!if "$(ice_src_dist)" != "" -ICE_CPPFLAGS = -I"$(ice_cpp_dir)\include" -!if "$(ice_cpp_dir)" == "$(ice_dir)\cpp" -ICE_LDFLAGS = /LIBPATH:"$(ice_cpp_dir)\lib" -!else -ICE_LDFLAGS = /LIBPATH:"$(ice_cpp_dir)\lib$(libsuff)" -!endif -!else -ICE_CPPFLAGS = -I"$(ice_dir)\include" -ICE_LDFLAGS = /LIBPATH:"$(ice_dir)\lib$(libsuff)" -!endif - -slicedir = $(ice_dir)\slice - -PYTHON_CPPFLAGS = -I"$(PYTHON_HOME)\include" -PYTHON_LDFLAGS = /LIBPATH:"$(PYTHON_HOME)\libs" - -ICECPPFLAGS = -I"$(slicedir)" -SLICE2PYFLAGS = $(ICECPPFLAGS) - -!if "$(ice_src_dist)" != "" -SLICE2PY = $(PYTHON_HOME)\python $(top_srcdir)\config\s2py.py -SLICEPARSERLIB = $(ice_cpp_dir)\lib\slice.lib -!if !exist ("$(SLICEPARSERLIB)") -SLICEPARSERLIB = $(ice_cpp_dir)\lib\sliced.lib -!endif -!else -SLICE2PY = $(PYTHON_HOME)\Scripts\slice2py.exe -SLICEPARSERLIB = $(PYTHON_HOME)\Scripts\slice2py.exe -!endif - -MT = mt.exe - -EVERYTHING = all clean install depend -EVERYTHING_EXCEPT_INSTALL = all clean depend - -.SUFFIXES: -.SUFFIXES: .cpp .obj .py .res .rc .d .ice - -DEPEND_DIR = .depend.mak - -depend:: - -!if exist(.depend.mak) -!include .depend.mak -!endif - -!if "$(OBJS)" != "" -depend:: - @del /q .depend.mak - -OBJS_DEPEND = $(OBJS:.obj=.d) -OBJS_DEPEND = $(OBJS_DEPEND:.\=.depend.mak\) - -depend:: $(OBJS_DEPEND) - -!endif - -.cpp{$(DEPEND_DIR)}.d: - @echo Generating dependencies for $< - @$(CXX) /E $(CPPFLAGS) $(CXXFLAGS) /showIncludes $< 1>$(*F).i 2>$(*F).d && \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend.vbs $(*F).cpp $(top_srcdir) - @del /q $(*F).d $(*F).i - -.cpp.obj:: - $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< - -.rc.res: - rc $(RCFLAGS) $< - -clean:: - del /q $(TARGETS) *.obj *.pyc *.bak - -all:: $(SRCS) $(TARGETS) - -install:: diff --git a/python/config/s2py.py b/python/config/s2py.py index 008d756f656..b3dbb9ad04d 100755 --- a/python/config/s2py.py +++ b/python/config/s2py.py @@ -9,15 +9,16 @@ # ********************************************************************** import sys, os, platform -sys.path.insert(1, os.path.join(os.path.dirname(sys.argv[0]), "..", "python")) + +basepath = os.path.dirname(os.path.realpath(__file__)) if sys.platform == "win32": - os.putenv("PATH", "{0};{1};{2}".format( - os.getenv('PATH'), - os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "cpp", "bin"), - os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "cpp", "third-party-packages", - "bzip2.v100" if sys.version_info < (3,5) else "bzip2.v140", "build", "native", "bin", - "Win32" if "32bit" in platform.architecture() else "x64", "Release"))) + platformName = "Win32" if "32bit" in platform.architecture() else "x64" + configurationName = os.getenv("CPP_CONFIGURATION", "Release") + sys.path.insert(1, os.path.join(basepath, "..", "python", platformName, configurationName)) + os.putenv("PATH", os.path.join(basepath, "..", "..", "cpp", "bin", platformName, configurationName)) +else: + sys.path.insert(1, os.path.join(basepath, "..", "python")) import IcePy diff --git a/python/modules/IcePy/.depend.mak b/python/modules/IcePy/.depend.mak deleted file mode 100644 index f4834457aa7..00000000000 --- a/python/modules/IcePy/.depend.mak +++ /dev/null @@ -1,1550 +0,0 @@ - -BatchRequestInterceptor.obj: \ - BatchRequestInterceptor.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "BatchRequestInterceptor.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Proxy.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "Thread.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - -Communicator.obj: \ - Communicator.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "$(ice_cpp_dir)\include\IceUtil\DisableWarnings.h" \ - "Communicator.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "BatchRequestInterceptor.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "ImplicitContext.h" \ - "$(ice_cpp_dir)\include\Ice\ImplicitContext.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "Logger.h" \ - "$(ice_cpp_dir)\include\Ice\Logger.h" \ - "ObjectAdapter.h" \ - "ObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactory.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\IceUtil\MutexProtocol.h" \ - "Operation.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "Properties.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\NativePropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.h" \ - "Proxy.h" \ - "Thread.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorAsync.h" \ - "$(ice_cpp_dir)\include\Ice\Communicator.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\Properties.h" \ - "$(ice_cpp_dir)\include\Ice\FacetMap.h" \ - "$(ice_cpp_dir)\include\Ice\Locator.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTableInit.h" \ - "$(ice_cpp_dir)\include\Ice\DefaultObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ProcessF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapter.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\Router.h" \ - -Connection.obj: \ - Connection.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Connection.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "Communicator.h" \ - "ConnectionInfo.h" \ - "$(ice_cpp_dir)\include\Ice\Connection.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "Endpoint.h" \ - "ObjectAdapter.h" \ - "Operation.h" \ - "Proxy.h" \ - "Thread.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionAsync.h" \ - -ConnectionInfo.obj: \ - ConnectionInfo.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "ConnectionInfo.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\Connection.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "EndpointInfo.h" \ - "Util.h" \ - -Current.obj: \ - Current.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Current.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "Connection.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "ObjectAdapter.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapter.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\ServantLocatorF.h" \ - "$(ice_cpp_dir)\include\Ice\LocatorF.h" \ - "$(ice_cpp_dir)\include\Ice\FacetMap.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - -Endpoint.obj: \ - Endpoint.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Endpoint.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointF.h" \ - "EndpointInfo.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - -EndpointInfo.obj: \ - EndpointInfo.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "EndpointInfo.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointF.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - -ImplicitContext.obj: \ - ImplicitContext.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "ImplicitContext.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\ImplicitContext.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "ObjectAdapter.h" \ - "Proxy.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "Util.h" \ - -Init.obj: \ - Init.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "BatchRequestInterceptor.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Communicator.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "Connection.h" \ - "ConnectionInfo.h" \ - "$(ice_cpp_dir)\include\Ice\Connection.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "Current.h" \ - "Endpoint.h" \ - "EndpointInfo.h" \ - "ImplicitContext.h" \ - "$(ice_cpp_dir)\include\Ice\ImplicitContext.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "Logger.h" \ - "$(ice_cpp_dir)\include\Ice\Logger.h" \ - "ObjectAdapter.h" \ - "Operation.h" \ - "Properties.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.h" \ - "PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\NativePropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.h" \ - "Proxy.h" \ - "Slice.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - -Logger.obj: \ - Logger.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Logger.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\Logger.h" \ - "Thread.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - -ObjectAdapter.obj: \ - ObjectAdapter.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "ObjectAdapter.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.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" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointF.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "Proxy.h" \ - "Thread.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.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\PropertiesF.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\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Types.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\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.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\Properties.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\FacetMap.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "$(ice_cpp_dir)\include\Ice\Locator.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTableInit.h" \ - "$(ice_cpp_dir)\include\Ice\DefaultObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ProcessF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapter.h" \ - "$(ice_cpp_dir)\include\Ice\Router.h" \ - "$(ice_cpp_dir)\include\Ice\ServantLocator.h" \ - -ObjectFactory.obj: \ - ObjectFactory.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "ObjectFactory.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectFactory.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyHandle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.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\IceUtil\MutexProtocol.h" \ - "Thread.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.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\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - -Operation.obj: \ - Operation.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Operation.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "Communicator.h" \ - "Current.h" \ - "Proxy.h" \ - "Thread.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.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\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "Connection.h" \ - "$(ice_cpp_dir)\include\Ice\Communicator.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.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\Properties.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\FacetMap.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\Endpoint.h" \ - "$(ice_cpp_dir)\include\Slice\PythonUtil.h" \ - "$(ice_cpp_dir)\include\Slice\Parser.h" \ - -Properties.obj: \ - Properties.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Properties.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "$(ice_cpp_dir)\include\Ice\Properties.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - -PropertiesAdmin.obj: \ - PropertiesAdmin.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "$(ice_cpp_dir)\include\IceUtil\DisableWarnings.h" \ - "PropertiesAdmin.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\NativePropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.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\IceUtil\MutexProtocol.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "Util.h" \ - "Thread.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "Types.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - -Proxy.obj: \ - Proxy.cpp \ - "$(ice_cpp_dir)\include\IceUtil\DisableWarnings.h" \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Proxy.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "Communicator.h" \ - "Connection.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\Endpoint.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointF.h" \ - "Operation.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "Thread.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.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\PropertiesF.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\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "$(ice_cpp_dir)\include\Ice\Communicator.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.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\ResponseHandlerF.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsync.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\Properties.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesAdmin.h" \ - "$(ice_cpp_dir)\include\Ice\FacetMap.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "$(ice_cpp_dir)\include\Ice\Locator.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTableInit.h" \ - "$(ice_cpp_dir)\include\Ice\DefaultObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactory.h" \ - "$(ice_cpp_dir)\include\Ice\ProcessF.h" \ - "$(ice_cpp_dir)\include\Ice\Router.h" \ - -Slice.obj: \ - Slice.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Slice.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.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\Util.h" \ - "$(ice_cpp_dir)\include\IceUtil\Options.h" \ - "$(ice_cpp_dir)\include\IceUtil\RecMutex.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\IceUtil\MutexProtocol.h" \ - -Thread.obj: \ - Thread.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Thread.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\Object.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - -Types.obj: \ - Types.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Types.h" \ - "Config.h" \ - "Util.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\Ice\Stream.h" \ - "$(ice_cpp_dir)\include\Ice\CommunicatorF.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\IceUtil\MutexProtocol.h" \ - "$(ice_cpp_dir)\include\Ice\IncomingAsyncF.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\EndpointF.h" \ - "$(ice_cpp_dir)\include\Ice\EndpointTypes.h" \ - "$(ice_cpp_dir)\include\Ice\ReferenceF.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestQueueF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResult.h" \ - "$(ice_cpp_dir)\include\IceUtil\Monitor.h" \ - "$(ice_cpp_dir)\include\IceUtil\Cond.h" \ - "$(ice_cpp_dir)\include\IceUtil\UniquePtr.h" \ - "$(ice_cpp_dir)\include\Ice\InstanceF.h" \ - "$(ice_cpp_dir)\include\Ice\AsyncResultF.h" \ - "$(ice_cpp_dir)\include\Ice\ObserverHelper.h" \ - "$(ice_cpp_dir)\include\Ice\Instrumentation.h" \ - "$(ice_cpp_dir)\include\Ice\BasicStream.h" \ - "$(ice_cpp_dir)\include\IceUtil\StringConverter.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryF.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectFactoryManagerF.h" \ - "$(ice_cpp_dir)\include\Ice\Buffer.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedDataF.h" \ - "$(ice_cpp_dir)\include\Ice\UserExceptionFactory.h" \ - "$(ice_cpp_dir)\include\Ice\FactoryTable.h" \ - "$(ice_cpp_dir)\include\IceUtil\OutputUtil.h" \ - "Current.h" \ - "Proxy.h" \ - "Thread.h" \ - "$(ice_cpp_dir)\include\Ice\Initialize.h" \ - "$(ice_cpp_dir)\include\IceUtil\Timer.h" \ - "$(ice_cpp_dir)\include\IceUtil\Thread.h" \ - "$(ice_cpp_dir)\include\Ice\PropertiesF.h" \ - "$(ice_cpp_dir)\include\Ice\LoggerF.h" \ - "$(ice_cpp_dir)\include\Ice\InstrumentationF.h" \ - "$(ice_cpp_dir)\include\Ice\Dispatcher.h" \ - "$(ice_cpp_dir)\include\Ice\Plugin.h" \ - "$(ice_cpp_dir)\include\Ice\BatchRequestInterceptor.h" \ - "$(ice_cpp_dir)\include\IceUtil\InputUtil.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "$(ice_cpp_dir)\include\Ice\SlicedData.h" \ - "$(ice_cpp_dir)\include\Ice\GCObject.h" \ - "$(ice_cpp_dir)\include\IceUtil\MutexPtrLock.h" \ - -Util.obj: \ - Util.cpp \ - "$(ice_cpp_dir)\include\IceUtil\Config.h" \ - "Util.h" \ - "Config.h" \ - "$(ice_cpp_dir)\include\Ice\BuiltinSequences.h" \ - "$(ice_cpp_dir)\include\IceUtil\PushDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\ProxyF.h" \ - "$(ice_cpp_dir)\include\IceUtil\Shared.h" \ - "$(ice_cpp_dir)\include\IceUtil\Atomic.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\ObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\Handle.h" \ - "$(ice_cpp_dir)\include\Ice\Exception.h" \ - "$(ice_cpp_dir)\include\Ice\Format.h" \ - "$(ice_cpp_dir)\include\Ice\StreamF.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObject.h" \ - "$(ice_cpp_dir)\include\Ice\LocalObjectF.h" \ - "$(ice_cpp_dir)\include\Ice\StreamHelpers.h" \ - "$(ice_cpp_dir)\include\IceUtil\ScopedArray.h" \ - "$(ice_cpp_dir)\include\IceUtil\Iterator.h" \ - "$(ice_cpp_dir)\include\IceUtil\Optional.h" \ - "$(ice_cpp_dir)\include\IceUtil\UndefSysMacros.h" \ - "$(ice_cpp_dir)\include\IceUtil\PopDisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\Current.h" \ - "$(ice_cpp_dir)\include\Ice\ObjectAdapterF.h" \ - "$(ice_cpp_dir)\include\Ice\ConnectionF.h" \ - "$(ice_cpp_dir)\include\Ice\Identity.h" \ - "$(ice_cpp_dir)\include\Ice\Version.h" \ - "$(ice_cpp_dir)\include\IceUtil\DisableWarnings.h" \ - "$(ice_cpp_dir)\include\Ice\LocalException.h" \ - "$(ice_cpp_dir)\include\Ice\Protocol.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/python/modules/IcePy/Communicator.cpp b/python/modules/IcePy/Communicator.cpp index db8f744da2e..1549cd1043c 100644 --- a/python/modules/IcePy/Communicator.cpp +++ b/python/modules/IcePy/Communicator.cpp @@ -16,7 +16,6 @@ #include <ImplicitContext.h> #include <Logger.h> #include <ObjectAdapter.h> -#include <ObjectFactory.h> #include <Operation.h> #include <Properties.h> #include <PropertiesAdmin.h> @@ -24,6 +23,8 @@ #include <Thread.h> #include <Types.h> #include <Util.h> +#include <ValueFactoryManager.h> +#include <Ice/ValueFactory.h> #include <Ice/Initialize.h> #include <Ice/CommunicatorAsync.h> #include <Ice/LocalException.h> @@ -141,12 +142,14 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) bool hasArgs = argList != 0; Ice::InitializationData data; + if(initData) { PyObjectHandle properties = PyObject_GetAttrString(initData, STRCAST("properties")); PyObjectHandle logger = PyObject_GetAttrString(initData, STRCAST("logger")); PyObjectHandle threadHook = PyObject_GetAttrString(initData, STRCAST("threadHook")); PyObjectHandle batchRequestInterceptor = PyObject_GetAttrString(initData, STRCAST("batchRequestInterceptor")); + PyErr_Clear(); // PyObject_GetAttrString sets an error on failure. if(properties.get() && properties.get() != Py_None) @@ -175,6 +178,11 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) } } + // + // We always supply our own implementation of ValueFactoryManager. + // + data.valueFactoryManager = new ValueFactoryManager; + try { if(argList) @@ -253,8 +261,6 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) delete[] argv; self->communicator = new Ice::CommunicatorPtr(communicator); - ObjectFactoryPtr factory = new ObjectFactory; - (*self->communicator)->addObjectFactory(factory, ""); CommunicatorMap::iterator p = _communicatorMap.find(communicator); if(p != _communicatorMap.end()) @@ -301,6 +307,10 @@ static PyObject* communicatorDestroy(CommunicatorObject* self) { assert(self->communicator); + + ValueFactoryManagerPtr vfm = ValueFactoryManagerPtr::dynamicCast((*self->communicator)->getValueFactoryManager()); + assert(vfm); + try { AllowThreads allowThreads; // Release Python's global interpreter lock to avoid a potential deadlock. @@ -309,17 +319,25 @@ communicatorDestroy(CommunicatorObject* self) catch(const Ice::Exception& ex) { setPythonException(ex); - return 0; } + vfm->destroy(); + // // Break cyclic reference between this object and its Python wrapper. // Py_XDECREF(self->wrapper); self->wrapper = 0; - Py_INCREF(Py_None); - return Py_None; + if(PyErr_Occurred()) + { + return 0; + } + else + { + Py_INCREF(Py_None); + return Py_None; + } } #ifdef WIN32 @@ -1168,12 +1186,16 @@ extern "C" static PyObject* communicatorAddObjectFactory(CommunicatorObject* self, PyObject* args) { - PyObject* factoryType = lookupType("Ice.ObjectFactory"); - assert(factoryType); + PyObject* objectFactoryType = lookupType("Ice.ObjectFactory"); + assert(objectFactoryType); + PyObject* valueFactoryType = lookupType("types.FunctionType"); + assert(valueFactoryType); - PyObject* factory; + PyObject* objectFactory; PyObject* strObj; - if(!PyArg_ParseTuple(args, STRCAST("O!O"), factoryType, &factory, &strObj)) + PyObject* valueFactory; + if(!PyArg_ParseTuple(args, STRCAST("O!OO!"), objectFactoryType, &objectFactory, &strObj, valueFactoryType, + &valueFactory)) { return 0; } @@ -1184,11 +1206,12 @@ communicatorAddObjectFactory(CommunicatorObject* self, PyObject* args) return 0; } - ObjectFactoryPtr pof; + ValueFactoryManagerPtr vfm = ValueFactoryManagerPtr::dynamicCast((*self->communicator)->getValueFactoryManager()); + assert(vfm); + try { - pof = ObjectFactoryPtr::dynamicCast((*self->communicator)->findObjectFactory("")); - assert(pof); + vfm->add(valueFactory, objectFactory, id); } catch(const Ice::Exception& ex) { @@ -1197,11 +1220,6 @@ communicatorAddObjectFactory(CommunicatorObject* self, PyObject* args) } - if(!pof->add(factory, id)) - { - return 0; - } - Py_INCREF(Py_None); return Py_None; } @@ -1224,19 +1242,21 @@ communicatorFindObjectFactory(CommunicatorObject* self, PyObject* args) return 0; } - ObjectFactoryPtr pof; - try - { - pof = ObjectFactoryPtr::dynamicCast((*self->communicator)->findObjectFactory("")); - assert(pof); - } - catch(const Ice::Exception& ex) - { - setPythonException(ex); - return 0; - } + ValueFactoryManagerPtr vfm = ValueFactoryManagerPtr::dynamicCast((*self->communicator)->getValueFactoryManager()); + assert(vfm); + + return vfm->findObjectFactory(id); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +communicatorGetValueFactoryManager(CommunicatorObject* self) +{ + ValueFactoryManagerPtr vfm = ValueFactoryManagerPtr::dynamicCast((*self->communicator)->getValueFactoryManager()); - return pof->find(id); + return vfm->getObject(); } #ifdef WIN32 @@ -1570,6 +1590,8 @@ static PyMethodDef CommunicatorMethods[] = PyDoc_STR(STRCAST("addObjectFactory(factory, id) -> None")) }, { STRCAST("findObjectFactory"), reinterpret_cast<PyCFunction>(communicatorFindObjectFactory), METH_VARARGS, PyDoc_STR(STRCAST("findObjectFactory(id) -> Ice.ObjectFactory")) }, + { STRCAST("getValueFactoryManager"), reinterpret_cast<PyCFunction>(communicatorGetValueFactoryManager), METH_NOARGS, + PyDoc_STR(STRCAST("getValueFactoryManager() -> Ice.ValueFactoryManager")) }, { STRCAST("getImplicitContext"), reinterpret_cast<PyCFunction>(communicatorGetImplicitContext), METH_NOARGS, PyDoc_STR(STRCAST("getImplicitContext() -> Ice.ImplicitContext")) }, { STRCAST("getProperties"), reinterpret_cast<PyCFunction>(communicatorGetProperties), METH_NOARGS, diff --git a/python/modules/IcePy/Connection.cpp b/python/modules/IcePy/Connection.cpp index 736b54a1416..2f5998bffc9 100644 --- a/python/modules/IcePy/Connection.cpp +++ b/python/modules/IcePy/Connection.cpp @@ -37,18 +37,18 @@ struct ConnectionObject Ice::CommunicatorPtr* communicator; }; -class ConnectionCallbackI : public Ice::ConnectionCallback +class CloseCallbackI : public Ice::CloseCallback { public: - ConnectionCallbackI(PyObject* cb, PyObject* con) : + CloseCallbackI(PyObject* cb, PyObject* con) : _cb(cb), _con(con) { Py_INCREF(cb); Py_INCREF(con); } - virtual ~ConnectionCallbackI() + virtual ~CloseCallbackI() { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. @@ -56,52 +56,94 @@ public: Py_DECREF(_con); } - virtual void heartbeat(const Ice::ConnectionPtr& con) - { - invoke("heartbeat", con); - } - virtual void closed(const Ice::ConnectionPtr& con) { - invoke("closed", con); + invoke(con); } private: - void invoke(const string& methodName, const Ice::ConnectionPtr& con) + void invoke(const Ice::ConnectionPtr& con) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. #ifndef NDEBUG ConnectionObject* c = reinterpret_cast<ConnectionObject*>(_con); assert(con == *(c->connection)); #endif - if(!PyObject_HasAttrString(_cb, STRCAST(methodName.c_str()))) + + PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), _con); + assert(_cb); + PyObjectHandle tmp = PyObject_Call(_cb, args.get(), 0); + if(PyErr_Occurred()) { - ostringstream ostr; - ostr << "connection callback object does not define " << methodName << "()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); + PyException ex; // Retrieve it before another Python API call clears it. + + // + // A callback that calls sys.exit() will raise the SystemExit exception. + // This is normally caught by the interpreter, causing it to exit. + // However, we have no way to pass this exception to the interpreter, + // so we act on it directly. + // + ex.checkSystemExit(); + + ex.raise(); } - else + } + + PyObject* _cb; + PyObject* _con; +}; + +class HeartbeatCallbackI : public Ice::HeartbeatCallback +{ +public: + + HeartbeatCallbackI(PyObject* cb, PyObject* con) : + _cb(cb), _con(con) + { + Py_INCREF(cb); + Py_INCREF(con); + } + + virtual ~HeartbeatCallbackI() + { + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + Py_DECREF(_cb); + Py_DECREF(_con); + } + + virtual void heartbeat(const Ice::ConnectionPtr& con) + { + invoke(con); + } + +private: + + void invoke(const Ice::ConnectionPtr& con) + { + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. +#ifndef NDEBUG + ConnectionObject* c = reinterpret_cast<ConnectionObject*>(_con); + assert(con == *(c->connection)); +#endif + + PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), _con); + assert(_cb); + PyObjectHandle tmp = PyObject_Call(_cb, args.get(), 0); + if(PyErr_Occurred()) { - PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), _con); - PyObjectHandle method = PyObject_GetAttrString(_cb, STRCAST(methodName.c_str())); - assert(method.get()); - PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); - if(PyErr_Occurred()) - { - PyException ex; // Retrieve it before another Python API call clears it. - - // - // A callback that calls sys.exit() will raise the SystemExit exception. - // This is normally caught by the interpreter, causing it to exit. - // However, we have no way to pass this exception to the interpreter, - // so we act on it directly. - // - ex.checkSystemExit(); - - ex.raise(); - } + PyException ex; // Retrieve it before another Python API call clears it. + + // + // A callback that calls sys.exit() will raise the SystemExit exception. + // This is normally caught by the interpreter, causing it to exit. + // However, we have no way to pass this exception to the interpreter, + // so we act on it directly. + // + ex.checkSystemExit(); + + ex.raise(); } } @@ -190,9 +232,7 @@ connectionCompare(ConnectionObject* c1, PyObject* other, int op) } } - PyObject* r = result ? getTrue() : getFalse(); - Py_INCREF(r); - return r; + return result ? incTrue() : incFalse(); } #ifdef WIN32 @@ -437,22 +477,53 @@ connectionEndFlushBatchRequests(ConnectionObject* self, PyObject* args) extern "C" #endif static PyObject* -connectionSetCallback(ConnectionObject* self, PyObject* args) +connectionSetCloseCallback(ConnectionObject* self, PyObject* args) +{ + assert(self->connection); + + PyObject* callbackType = lookupType("types.FunctionType"); + PyObject* cb; + if(!PyArg_ParseTuple(args, STRCAST("O!"), callbackType, &cb)) + { + return 0; + } + + Ice::CloseCallbackPtr wrapper = new CloseCallbackI(cb, reinterpret_cast<PyObject*>(self)); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking invocations. + (*self->connection)->setCloseCallback(wrapper); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +connectionSetHeartbeatCallback(ConnectionObject* self, PyObject* args) { assert(self->connection); - PyObject* callbackType = lookupType("Ice.ConnectionCallback"); + PyObject* callbackType = lookupType("types.FunctionType"); PyObject* cb; if(!PyArg_ParseTuple(args, STRCAST("O!"), callbackType, &cb)) { return 0; } - Ice::ConnectionCallbackPtr wrapper = new ConnectionCallbackI(cb, reinterpret_cast<PyObject*>(self)); + Ice::HeartbeatCallbackPtr wrapper = new HeartbeatCallbackI(cb, reinterpret_cast<PyObject*>(self)); try { AllowThreads allowThreads; // Release Python's global interpreter lock during blocking invocations. - (*self->connection)->setCallback(wrapper); + (*self->connection)->setHeartbeatCallback(wrapper); } catch(const Ice::Exception& ex) { @@ -754,8 +825,10 @@ static PyMethodDef ConnectionMethods[] = METH_VARARGS | METH_KEYWORDS, PyDoc_STR(STRCAST("begin_flushBatchRequests([_ex][, _sent]) -> Ice.AsyncResult")) }, { STRCAST("end_flushBatchRequests"), reinterpret_cast<PyCFunction>(connectionEndFlushBatchRequests), METH_VARARGS, PyDoc_STR(STRCAST("end_flushBatchRequests(Ice.AsyncResult) -> None")) }, - { STRCAST("setCallback"), reinterpret_cast<PyCFunction>(connectionSetCallback), METH_VARARGS, - PyDoc_STR(STRCAST("setCallback(Ice.ConnectionCallback) -> None")) }, + { STRCAST("setCloseCallback"), reinterpret_cast<PyCFunction>(connectionSetCloseCallback), METH_VARARGS, + PyDoc_STR(STRCAST("setCloseCallback(Ice.CloseCallback) -> None")) }, + { STRCAST("setHeartbeatCallback"), reinterpret_cast<PyCFunction>(connectionSetHeartbeatCallback), METH_VARARGS, + PyDoc_STR(STRCAST("setHeartbeatCallback(Ice.HeartbeatCallback) -> None")) }, { STRCAST("setACM"), reinterpret_cast<PyCFunction>(connectionSetACM), METH_VARARGS, PyDoc_STR(STRCAST("setACM(int, Ice.ACMClose, Ice.ACMHeartbeat) -> None")) }, { STRCAST("getACM"), reinterpret_cast<PyCFunction>(connectionGetACM), METH_NOARGS, diff --git a/python/modules/IcePy/ConnectionInfo.cpp b/python/modules/IcePy/ConnectionInfo.cpp index 7e884881c23..bab845be7f0 100644 --- a/python/modules/IcePy/ConnectionInfo.cpp +++ b/python/modules/IcePy/ConnectionInfo.cpp @@ -54,38 +54,27 @@ connectionInfoDealloc(ConnectionInfoObject* self) extern "C" #endif static PyObject* -connectionInfoGetIncoming(ConnectionInfoObject* self) -{ - PyObject* result = (*self->connectionInfo)->incoming ? getTrue() : getFalse(); - Py_INCREF(result); - return result; -} - -#ifdef WIN32 -extern "C" -#endif -static PyObject* -connectionInfoGetAdapterName(ConnectionInfoObject* self) +connectionInfoGetUnderlying(ConnectionInfoObject* self) { - return createString((*self->connectionInfo)->adapterName); + return createConnectionInfo((*self->connectionInfo)->underlying); } #ifdef WIN32 extern "C" #endif static PyObject* -connectionInfoGetRcvSize(ConnectionInfoObject* self) +connectionInfoGetIncoming(ConnectionInfoObject* self) { - return PyLong_FromLong((*self->connectionInfo)->rcvSize); + return (*self->connectionInfo)->incoming ? incTrue() : incFalse(); } #ifdef WIN32 extern "C" #endif static PyObject* -connectionInfoGetSndSize(ConnectionInfoObject* self) +connectionInfoGetAdapterName(ConnectionInfoObject* self) { - return PyLong_FromLong((*self->connectionInfo)->sndSize); + return createString((*self->connectionInfo)->adapterName); } #ifdef WIN32 @@ -136,6 +125,28 @@ ipConnectionInfoGetRemotePort(ConnectionInfoObject* self) extern "C" #endif static PyObject* +tcpConnectionInfoGetRcvSize(ConnectionInfoObject* self) +{ + Ice::TCPConnectionInfoPtr info = Ice::TCPConnectionInfoPtr::dynamicCast(*self->connectionInfo); + assert(info); + return PyLong_FromLong(info->rcvSize); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +tcpConnectionInfoGetSndSize(ConnectionInfoObject* self) +{ + Ice::TCPConnectionInfoPtr info = Ice::TCPConnectionInfoPtr::dynamicCast(*self->connectionInfo); + assert(info); + return PyLong_FromLong(info->sndSize); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* udpConnectionInfoGetMcastAddress(ConnectionInfoObject* self) { Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); @@ -158,6 +169,28 @@ udpConnectionInfoGetMcastPort(ConnectionInfoObject* self, void* member) extern "C" #endif static PyObject* +udpConnectionInfoGetRcvSize(ConnectionInfoObject* self) +{ + Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); + assert(info); + return PyLong_FromLong(info->rcvSize); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +udpConnectionInfoGetSndSize(ConnectionInfoObject* self) +{ + Ice::UDPConnectionInfoPtr info = Ice::UDPConnectionInfoPtr::dynamicCast(*self->connectionInfo); + assert(info); + return PyLong_FromLong(info->sndSize); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* wsConnectionInfoGetHeaders(ConnectionInfoObject* self) { Ice::WSConnectionInfoPtr info = Ice::WSConnectionInfoPtr::dynamicCast(*self->connectionInfo); @@ -212,47 +245,17 @@ sslConnectionInfoGetVerified(ConnectionInfoObject* self) { IceSSL::ConnectionInfoPtr info = IceSSL::ConnectionInfoPtr::dynamicCast(*self->connectionInfo); assert(info); - PyObject* result = info->incoming ? getTrue() : getFalse(); - Py_INCREF(result); - return result; -} - -#ifdef WIN32 -extern "C" -#endif -static PyObject* -wssConnectionInfoGetHeaders(ConnectionInfoObject* self) -{ - IceSSL::WSSConnectionInfoPtr info = IceSSL::WSSConnectionInfoPtr::dynamicCast(*self->connectionInfo); - assert(info); - - PyObjectHandle result = PyDict_New(); - if(result.get()) - { - for(Ice::HeaderDict::iterator p = info->headers.begin(); p != info->headers.end(); ++p) - { - PyObjectHandle key = createString(p->first); - PyObjectHandle val = createString(p->second); - if(!val.get() || PyDict_SetItem(result.get(), key.get(), val.get()) < 0) - { - return 0; - } - } - } - - return result.release(); + return info->incoming ? incTrue() : incFalse(); } static PyGetSetDef ConnectionInfoGetters[] = { + { STRCAST("underlying"), reinterpret_cast<getter>(connectionInfoGetUnderlying), 0, + PyDoc_STR(STRCAST("get underlying connection information")), 0 }, { STRCAST("incoming"), reinterpret_cast<getter>(connectionInfoGetIncoming), 0, PyDoc_STR(STRCAST("whether connection is incoming")), 0 }, { STRCAST("adapterName"), reinterpret_cast<getter>(connectionInfoGetAdapterName), 0, PyDoc_STR(STRCAST("adapter associated the connection")), 0 }, - { STRCAST("rcvSize"), reinterpret_cast<getter>(connectionInfoGetRcvSize), 0, - PyDoc_STR(STRCAST("receive buffer size")), 0 }, - { STRCAST("sndSize"), reinterpret_cast<getter>(connectionInfoGetSndSize), 0, - PyDoc_STR(STRCAST("send buffer size")), 0 }, { 0, 0 } /* sentinel */ }; @@ -269,12 +272,25 @@ static PyGetSetDef IPConnectionInfoGetters[] = { 0, 0 } /* sentinel */ }; +static PyGetSetDef TCPConnectionInfoGetters[] = +{ + { STRCAST("rcvSize"), reinterpret_cast<getter>(tcpConnectionInfoGetRcvSize), 0, + PyDoc_STR(STRCAST("receive buffer size")), 0 }, + { STRCAST("sndSize"), reinterpret_cast<getter>(tcpConnectionInfoGetSndSize), 0, + PyDoc_STR(STRCAST("send buffer size")), 0 }, + { 0, 0 } /* sentinel */ +}; + static PyGetSetDef UDPConnectionInfoGetters[] = { { STRCAST("mcastAddress"), reinterpret_cast<getter>(udpConnectionInfoGetMcastAddress), 0, PyDoc_STR(STRCAST("multicast address")), 0 }, { STRCAST("mcastPort"), reinterpret_cast<getter>(udpConnectionInfoGetMcastPort), 0, PyDoc_STR(STRCAST("multicast port")), 0 }, + { STRCAST("rcvSize"), reinterpret_cast<getter>(udpConnectionInfoGetRcvSize), 0, + PyDoc_STR(STRCAST("receive buffer size")), 0 }, + { STRCAST("sndSize"), reinterpret_cast<getter>(udpConnectionInfoGetSndSize), 0, + PyDoc_STR(STRCAST("send buffer size")), 0 }, { 0, 0 } /* sentinel */ }; @@ -296,13 +312,6 @@ static PyGetSetDef SSLConnectionInfoGetters[] = { 0, 0 } /* sentinel */ }; -static PyGetSetDef WSSConnectionInfoGetters[] = -{ - { STRCAST("headers"), reinterpret_cast<getter>(wssConnectionInfoGetHeaders), 0, - PyDoc_STR(STRCAST("request headers")), 0 }, - { 0, 0 } /* sentinel */ -}; - namespace IcePy { @@ -434,7 +443,7 @@ PyTypeObject TCPConnectionInfoType = 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ - 0, /* tp_getset */ + TCPConnectionInfoGetters, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ @@ -588,53 +597,6 @@ PyTypeObject SSLConnectionInfoType = 0, /* tp_is_gc */ }; -PyTypeObject WSSConnectionInfoType = -{ - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(0, 0) - STRCAST("IcePy.WSSConnectionInfo"),/* tp_name */ - sizeof(ConnectionInfoObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)connectionInfoDealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - WSSConnectionInfoGetters, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - (newfunc)connectionInfoNew, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ -}; - } bool @@ -683,7 +645,7 @@ IcePy::initConnectionInfo(PyObject* module) return false; } - WSConnectionInfoType.tp_base = &IPConnectionInfoType; // Force inheritance from IPConnectionType. + WSConnectionInfoType.tp_base = &ConnectionInfoType; // Force inheritance from IPConnectionType. if(PyType_Ready(&WSConnectionInfoType) < 0) { return false; @@ -694,7 +656,7 @@ IcePy::initConnectionInfo(PyObject* module) return false; } - SSLConnectionInfoType.tp_base = &IPConnectionInfoType; // Force inheritance from IPConnectionInfoType. + SSLConnectionInfoType.tp_base = &ConnectionInfoType; // Force inheritance from IPConnectionInfoType. if(PyType_Ready(&SSLConnectionInfoType) < 0) { return false; @@ -705,17 +667,6 @@ IcePy::initConnectionInfo(PyObject* module) return false; } - WSSConnectionInfoType.tp_base = &SSLConnectionInfoType; // Force inheritance from IPConnectionType. - if(PyType_Ready(&WSSConnectionInfoType) < 0) - { - return false; - } - type = &WSSConnectionInfoType; // Necessary to prevent GCC's strict-alias warnings. - if(PyModule_AddObject(module, STRCAST("WSSConnectionInfo"), reinterpret_cast<PyObject*>(type)) < 0) - { - return false; - } - return true; } @@ -730,6 +681,12 @@ IcePy::getConnectionInfo(PyObject* obj) PyObject* IcePy::createConnectionInfo(const Ice::ConnectionInfoPtr& connectionInfo) { + if(!connectionInfo) + { + Py_INCREF(Py_None); + return Py_None; + } + PyTypeObject* type; if(Ice::WSConnectionInfoPtr::dynamicCast(connectionInfo)) { @@ -743,10 +700,6 @@ IcePy::createConnectionInfo(const Ice::ConnectionInfoPtr& connectionInfo) { type = &UDPConnectionInfoType; } - else if(IceSSL::WSSConnectionInfoPtr::dynamicCast(connectionInfo)) - { - type = &WSSConnectionInfoType; - } else if(IceSSL::ConnectionInfoPtr::dynamicCast(connectionInfo)) { type = &SSLConnectionInfoType; diff --git a/python/modules/IcePy/Endpoint.cpp b/python/modules/IcePy/Endpoint.cpp index 9dddc735e5c..4482c759d47 100644 --- a/python/modules/IcePy/Endpoint.cpp +++ b/python/modules/IcePy/Endpoint.cpp @@ -99,9 +99,7 @@ endpointCompare(EndpointObject* p1, PyObject* other, int op) } } - PyObject* r = result ? getTrue() : getFalse(); - Py_INCREF(r); - return r; + return result ? incTrue() : incFalse(); } #ifdef WIN32 diff --git a/python/modules/IcePy/EndpointInfo.cpp b/python/modules/IcePy/EndpointInfo.cpp index 1de0789653b..80001072a91 100644 --- a/python/modules/IcePy/EndpointInfo.cpp +++ b/python/modules/IcePy/EndpointInfo.cpp @@ -124,6 +124,15 @@ endpointInfoSecure(EndpointInfoObject* self) extern "C" #endif static PyObject* +endpointInfoGetUnderlying(EndpointInfoObject* self) +{ + return createEndpointInfo((*self->endpointInfo)->underlying); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* endpointInfoGetTimeout(EndpointInfoObject* self) { return PyLong_FromLong((*self->endpointInfo)->timeout); @@ -135,9 +144,7 @@ extern "C" static PyObject* endpointInfoGetCompress(EndpointInfoObject* self) { - PyObject* result = (*self->endpointInfo)->compress ? getTrue() : getFalse(); - Py_INCREF(result); - return result; + return (*self->endpointInfo)->compress ? incTrue() : incFalse(); } #ifdef WIN32 @@ -210,17 +217,6 @@ wsEndpointInfoGetResource(EndpointInfoObject* self) extern "C" #endif static PyObject* -wssEndpointInfoGetResource(EndpointInfoObject* self) -{ - IceSSL::WSSEndpointInfoPtr info = IceSSL::WSSEndpointInfoPtr::dynamicCast(*self->endpointInfo); - assert(info); - return createString(info->resource); -} - -#ifdef WIN32 -extern "C" -#endif -static PyObject* opaqueEndpointInfoGetRawBytes(EndpointInfoObject* self) { Ice::OpaqueEndpointInfoPtr info = Ice::OpaqueEndpointInfoPtr::dynamicCast(*self->endpointInfo); @@ -258,6 +254,8 @@ static PyMethodDef EndpointInfoMethods[] = static PyGetSetDef EndpointInfoGetters[] = { + { STRCAST("underlying"), reinterpret_cast<getter>(endpointInfoGetUnderlying), 0, + PyDoc_STR(STRCAST("underling endpoint information")), 0 }, { STRCAST("timeout"), reinterpret_cast<getter>(endpointInfoGetTimeout), 0, PyDoc_STR(STRCAST("timeout in milliseconds")), 0 }, { STRCAST("compress"), reinterpret_cast<getter>(endpointInfoGetCompress), 0, @@ -292,13 +290,6 @@ static PyGetSetDef WSEndpointInfoGetters[] = { 0, 0 } /* sentinel */ }; -static PyGetSetDef WSSEndpointInfoGetters[] = -{ - { STRCAST("resource"), reinterpret_cast<getter>(wssEndpointInfoGetResource), 0, - PyDoc_STR(STRCAST("resource")), 0 }, - { 0, 0 } /* sentinel */ -}; - static PyGetSetDef OpaqueEndpointInfoGetters[] = { { STRCAST("rawBytes"), reinterpret_cast<getter>(opaqueEndpointInfoGetRawBytes), 0, @@ -363,7 +354,7 @@ PyTypeObject IPEndpointInfoType = /* The ob_type field must be initialized in the module init function * to be portable to Windows without using C++. */ PyVarObject_HEAD_INIT(0, 0) - STRCAST("IcePy.IPEndpointInfo"), /* tp_name */ + STRCAST(".IPEndpointInfo"), /* tp_name */ sizeof(EndpointInfoObject), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ @@ -593,53 +584,6 @@ PyTypeObject SSLEndpointInfoType = 0, /* tp_is_gc */ }; -PyTypeObject WSSEndpointInfoType = -{ - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(0, 0) - STRCAST("IcePy.WSSEndpointInfo"), /* tp_name */ - sizeof(EndpointInfoObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - reinterpret_cast<destructor>(endpointInfoDealloc), /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - WSSEndpointInfoGetters, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - reinterpret_cast<newfunc>(endpointInfoNew), /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ -}; - PyTypeObject OpaqueEndpointInfoType = { /* The ob_type field must be initialized in the module init function @@ -735,7 +679,7 @@ IcePy::initEndpointInfo(PyObject* module) return false; } - WSEndpointInfoType.tp_base = &IPEndpointInfoType; // Force inheritance from IPEndpointType. + WSEndpointInfoType.tp_base = &EndpointInfoType; // Force inheritance from IPEndpointType. if(PyType_Ready(&WSEndpointInfoType) < 0) { return false; @@ -746,7 +690,7 @@ IcePy::initEndpointInfo(PyObject* module) return false; } - SSLEndpointInfoType.tp_base = &IPEndpointInfoType; // Force inheritance from IPEndpointInfoType. + SSLEndpointInfoType.tp_base = &EndpointInfoType; // Force inheritance from IPEndpointInfoType. if(PyType_Ready(&SSLEndpointInfoType) < 0) { return false; @@ -757,17 +701,6 @@ IcePy::initEndpointInfo(PyObject* module) return false; } - WSSEndpointInfoType.tp_base = &SSLEndpointInfoType; // Force inheritance from SSLEndpointInfoType. - if(PyType_Ready(&WSSEndpointInfoType) < 0) - { - return false; - } - type = &WSSEndpointInfoType; // Necessary to prevent GCC's strict-alias warnings. - if(PyModule_AddObject(module, STRCAST("WSSEndpointInfo"), reinterpret_cast<PyObject*>(type)) < 0) - { - return false; - } - OpaqueEndpointInfoType.tp_base = &EndpointInfoType; // Force inheritance from EndpointType. if(PyType_Ready(&OpaqueEndpointInfoType) < 0) { @@ -793,6 +726,12 @@ IcePy::getEndpointInfo(PyObject* obj) PyObject* IcePy::createEndpointInfo(const Ice::EndpointInfoPtr& endpointInfo) { + if(!endpointInfo) + { + Py_INCREF(Py_None); + return Py_None; + } + PyTypeObject* type; if(Ice::WSEndpointInfoPtr::dynamicCast(endpointInfo)) { @@ -806,10 +745,6 @@ IcePy::createEndpointInfo(const Ice::EndpointInfoPtr& endpointInfo) { type = &UDPEndpointInfoType; } - else if(IceSSL::WSSEndpointInfoPtr::dynamicCast(endpointInfo)) - { - type = &WSSEndpointInfoType; - } else if(IceSSL::EndpointInfoPtr::dynamicCast(endpointInfo)) { type = &SSLEndpointInfoType; @@ -824,7 +759,6 @@ IcePy::createEndpointInfo(const Ice::EndpointInfoPtr& endpointInfo) } else { - std::cout << "CREATE" << std::endl; type = &EndpointInfoType; } diff --git a/python/modules/IcePy/IcePy.rc b/python/modules/IcePy/IcePy.rc index d3cbcdc30be..368143bc3bc 100644 --- a/python/modules/IcePy/IcePy.rc +++ b/python/modules/IcePy/IcePy.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,3,0 - PRODUCTVERSION 3,6,3,0 + FILEVERSION 3,7,53,0 + PRODUCTVERSION 3,7,53,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "Ice for Python Extension\0" - VALUE "FileVersion", "3.6.3\0" + VALUE "FileVersion", "3.7a3\0" VALUE "InternalName", INTERNALNAME VALUE "LegalCopyright", "Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.3\0" + VALUE "ProductVersion", "3.7a3\0" END END BLOCK "VarFileInfo" diff --git a/python/modules/IcePy/ImplicitContext.cpp b/python/modules/IcePy/ImplicitContext.cpp index 147c2cd2c15..47626855b11 100644 --- a/python/modules/IcePy/ImplicitContext.cpp +++ b/python/modules/IcePy/ImplicitContext.cpp @@ -108,9 +108,7 @@ implicitContextCompare(ImplicitContextObject* c1, PyObject* other, int op) } } - PyObject* r = result ? getTrue() : getFalse(); - Py_INCREF(r); - return r; + return result ? incTrue() : incFalse(); } #ifdef WIN32 diff --git a/python/modules/IcePy/Init.cpp b/python/modules/IcePy/Init.cpp index 7c8ea18602f..88205ebc571 100644 --- a/python/modules/IcePy/Init.cpp +++ b/python/modules/IcePy/Init.cpp @@ -26,6 +26,7 @@ #include <Proxy.h> #include <Slice.h> #include <Types.h> +#include <ValueFactoryManager.h> #include <Ice/Initialize.h> using namespace std; @@ -234,6 +235,10 @@ initIcePy(void) { INIT_RETURN; } + if(!initValueFactoryManager(module)) + { + INIT_RETURN; + } #if PY_VERSION_HEX >= 0x03000000 return module; diff --git a/python/modules/IcePy/Makefile b/python/modules/IcePy/Makefile deleted file mode 100644 index eeade7d1257..00000000000 --- a/python/modules/IcePy/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = ../.. - -LIBFILENAME = $(call mkpylibfilename,IcePy,$(VERSION)) -SONAME = $(call mkpysoname,IcePy,$(SOVERSION)) -LIBNAME = $(call mkpylibname,IcePy) - -TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) - -OBJS = BatchRequestInterceptor.o \ - Communicator.o \ - Connection.o \ - ConnectionInfo.o \ - Current.o \ - Endpoint.o \ - EndpointInfo.o \ - ImplicitContext.o \ - Init.o \ - Logger.o \ - ObjectAdapter.o \ - ObjectFactory.o \ - Operation.o \ - Properties.o \ - PropertiesAdmin.o \ - Proxy.o \ - Slice.o \ - Thread.o \ - Types.o \ - Util.o - -include $(top_srcdir)/config/Make.rules - -CPPFLAGS := -I. $(CPPFLAGS) $(ICE_FLAGS) $(PYTHON_FLAGS) - -LINKWITH := $(ICE_LIBS) $(PYTHON_LIBS) $(CXXLIBS) - -$(libdir)/$(LIBFILENAME): $(OBJS) - rm -f $@ - $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) - -$(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) - rm -f $@ - ln -s $(LIBFILENAME) $@ - -$(libdir)/$(LIBNAME): $(libdir)/$(SONAME) - rm -f $@ - ln -s $(SONAME) $@ - -install:: all - $(call installlib,$(DESTDIR)$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) diff --git a/python/modules/IcePy/Makefile.mak b/python/modules/IcePy/Makefile.mak deleted file mode 100644 index e35d6423c55..00000000000 --- a/python/modules/IcePy/Makefile.mak +++ /dev/null @@ -1,77 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = ..\.. - -LIBNAME = IcePy$(PYLIBSUFFIX).lib -DLLNAME = $(top_srcdir)\python\IcePy$(PYLIBSUFFIX).pyd - -TARGETS = $(LIBNAME) $(DLLNAME) - -OBJS = .\BatchRequestInterceptor.obj \ - .\Communicator.obj \ - .\Connection.obj \ - .\ConnectionInfo.obj \ - .\Current.obj \ - .\Endpoint.obj \ - .\EndpointInfo.obj \ - .\ImplicitContext.obj \ - .\Init.obj \ - .\Logger.obj \ - .\ObjectAdapter.obj \ - .\ObjectFactory.obj \ - .\Operation.obj \ - .\Properties.obj \ - .\PropertiesAdmin.obj \ - .\Proxy.obj \ - .\Slice.obj \ - .\Thread.obj \ - .\Types.obj \ - .\Util.obj - -# -# Get Make.common.rules.mak to figure out CPP_COMPILER by setting it -# to "auto" -# -CPP_COMPILER=auto - -!include $(top_srcdir)\config\Make.rules.mak - -!if exist ($(PYTHON_HOME)\python35.dll) -REQUIRED_COMPILER = VC140 -!else -REQUIRED_COMPILER = VC100 -!endif -# -# Ensure we're using VC100 -# -!if "$(CPP_COMPILER)" != "$(REQUIRED_COMPILER)" -!error Invalid CPP_COMPILER setting: $(CPP_COMPILER). Must be set to $(REQUIRED_COMPILER). -!endif - -CPPFLAGS = -I. $(CPPFLAGS) $(ICE_CPPFLAGS) $(PYTHON_CPPFLAGS) -DWIN32_LEAN_AND_MEAN - -LINKWITH = $(ICE_LIBS) $(PYTHON_LIBS) $(CXXLIBS) - -$(LIBNAME): $(DLLNAME) - -$(DLLNAME): $(OBJS) IcePy.res - $(LINK) $(PYTHON_LDFLAGS) $(ICE_LDFLAGS) $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) \ - $(PREOUT)$@ $(PRELIBS)$(LINKWITH) IcePy.res - move $(@:.pyd=.lib) $(LIBNAME) - @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ - $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest - @if exist $(@:.pyd=.exp) del /q $(@:.pyd=.exp) - - -clean:: - -del /q IcePy.res - -install:: all - copy $(DLLNAME) "$(install_libdir)" diff --git a/python/modules/IcePy/Makefile.mk b/python/modules/IcePy/Makefile.mk new file mode 100644 index 00000000000..bbe6a034dad --- /dev/null +++ b/python/modules/IcePy/Makefile.mk @@ -0,0 +1,33 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2016 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. +# +# ********************************************************************** + +$(project)_libraries := IcePy + +IcePy_target := python-module +IcePy_targetname := IcePy +IcePy_targetdir := $(lang_srcdir)/python +IcePy_installdir := $(install_pythondir) +IcePy_cppflags := -I$(project) -I$(top_srcdir)/cpp/include -I$(top_srcdir)/cpp/include/generated \ + -I$(top_srcdir)/cpp/src $(python_cppflags) +IcePy_ldflags := $(python_ldflags) +IcePy_dependencies := IceSSL Ice +IcePy_libs := mcpp +IcePy_extra_sources := $(filter-out %Util.cpp %Ruby.cpp,\ + $(wildcard $(top_srcdir)/cpp/src/Slice/*.cpp)) \ + $(top_srcdir)/cpp/src/Slice/SliceUtil.cpp \ + $(top_srcdir)/cpp/src/Slice/PythonUtil.cpp + +# +# On the default platform, always write the module in the python directory. +# +$(foreach p,$(supported-platforms),$(eval $$p_targetdir[IcePy] := /$$p)) +$(firstword $(supported-platforms))_targetdir[IcePy] := + +projects += $(project) +srcs:: $(project) diff --git a/python/modules/IcePy/ObjectAdapter.cpp b/python/modules/IcePy/ObjectAdapter.cpp index f89572a901b..a51cca80c93 100644 --- a/python/modules/IcePy/ObjectAdapter.cpp +++ b/python/modules/IcePy/ObjectAdapter.cpp @@ -164,7 +164,7 @@ IcePy::ServantLocatorWrapper::locate(const Ice::Current& current, Ice::LocalObje PyObject* userExceptionType = lookupType("Ice.UserException"); if(PyObject_IsInstance(ex.ex.get(), userExceptionType)) { - throw ExceptionWriter(current.adapter->getCommunicator(), ex.ex); + throw ExceptionWriter(ex.ex); } ex.raise(); @@ -243,7 +243,7 @@ IcePy::ServantLocatorWrapper::finished(const Ice::Current& current, const Ice::O PyObject* userExceptionType = lookupType("Ice.UserException"); if(PyObject_IsInstance(ex.ex.get(), userExceptionType)) { - throw ExceptionWriter(current.adapter->getCommunicator(), ex.ex); + throw ExceptionWriter(ex.ex); } ex.raise(); diff --git a/python/modules/IcePy/ObjectFactory.cpp b/python/modules/IcePy/ObjectFactory.cpp deleted file mode 100644 index d83e5693f58..00000000000 --- a/python/modules/IcePy/ObjectFactory.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2016 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. -// -// ********************************************************************** - -#ifdef _WIN32 -# include <IceUtil/Config.h> -#endif -#include <ObjectFactory.h> -#include <Thread.h> -#include <Types.h> -#include <Util.h> -#include <Ice/LocalException.h> - -using namespace std; -using namespace IcePy; - -IcePy::ObjectFactory::ObjectFactory() -{ -} - -IcePy::ObjectFactory::~ObjectFactory() -{ - assert(_factoryMap.empty()); -} - -Ice::ObjectPtr -IcePy::ObjectFactory::create(const string& id) -{ - PyObject* factory = 0; - - // - // Check if the application has registered a factory for this id. - // - { - Lock sync(*this); - - FactoryMap::iterator p = _factoryMap.find(id); - if(p != _factoryMap.end()) - { - factory = p->second; - } - } - - // - // Get the type information. - // - ClassInfoPtr info; - if(id == Ice::Object::ice_staticId()) - { - // - // When the ID is that of Ice::Object, it indicates that the stream has not - // found a factory and is providing us an opportunity to preserve the object. - // - info = lookupClassInfo("::Ice::UnknownSlicedObject"); - } - else - { - info = lookupClassInfo(id); - } - - if(!info) - { - return 0; - } - - if(factory) - { - // - // Invoke the create method on the Python factory object. - // - 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) - { - return 0; - } - return new ObjectReader(obj.get(), info); - } - - // - // If the requested type is an abstract class, then we give up. - // - if(info->isAbstract) - { - return 0; - } - - // - // Instantiate the object. - // - PyTypeObject* type = reinterpret_cast<PyTypeObject*>(info->pythonType.get()); - PyObjectHandle args = PyTuple_New(0); - PyObjectHandle obj = type->tp_new(type, args.get(), 0); - if(!obj.get()) - { - assert(PyErr_Occurred()); - throw AbortMarshaling(); - } - - return new ObjectReader(obj.get(), info); -} - -void -IcePy::ObjectFactory::destroy() -{ - FactoryMap factories; - - { - Lock sync(*this); - factories = _factoryMap; - _factoryMap.clear(); - } - - // - // We release the GIL before calling communicator->destroy(), so we must - // reacquire it before calling back into Python. - // - AdoptThread adoptThread; - - for(FactoryMap::iterator p = factories.begin(); p != factories.end(); ++p) - { - // - // Invoke the destroy method on each registered Python factory. - // - PyObjectHandle obj = PyObject_CallMethod(p->second, STRCAST("destroy"), 0); - PyErr_Clear(); // Ignore errors. - Py_DECREF(p->second); - } -} - -bool -IcePy::ObjectFactory::add(PyObject* factory, const string& id) -{ - Lock sync(*this); - - FactoryMap::iterator p = _factoryMap.find(id); - if(p != _factoryMap.end()) - { - Ice::AlreadyRegisteredException ex(__FILE__, __LINE__); - ex.kindOfObject = "object factory"; - ex.id = id; - setPythonException(ex); - return false; - } - - _factoryMap.insert(FactoryMap::value_type(id, factory)); - Py_INCREF(factory); - - return true; -} - -bool -IcePy::ObjectFactory::remove(const string& id) -{ - Lock sync(*this); - - FactoryMap::iterator p = _factoryMap.find(id); - if(p == _factoryMap.end()) - { - Ice::NotRegisteredException ex(__FILE__, __LINE__); - ex.kindOfObject = "object factory"; - ex.id = id; - setPythonException(ex); - return false; - } - - Py_DECREF(p->second); - _factoryMap.erase(p); - - return true; -} - -PyObject* -IcePy::ObjectFactory::find(const string& id) -{ - Lock sync(*this); - - FactoryMap::iterator p = _factoryMap.find(id); - if(p == _factoryMap.end()) - { - Py_INCREF(Py_None); - return Py_None; - } - - Py_INCREF(p->second); - return p->second; -} diff --git a/python/modules/IcePy/ObjectFactory.h b/python/modules/IcePy/ObjectFactory.h deleted file mode 100644 index a1da8c60bbb..00000000000 --- a/python/modules/IcePy/ObjectFactory.h +++ /dev/null @@ -1,50 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2016 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 ICEPY_OBJECT_FACTORY_H -#define ICEPY_OBJECT_FACTORY_H - -#include <Config.h> -#include <Ice/ObjectF.h> -#include <Ice/ObjectFactory.h> -#include <IceUtil/Mutex.h> - -namespace IcePy -{ - -// -// Each communicator registers an instance of ObjectFactory as its -// default object factory. This instance delegates to registered Python -// objects, and instantiates concrete classes when no factory is present. -// -class ObjectFactory : public Ice::ObjectFactory, public IceUtil::Mutex -{ -public: - - ObjectFactory(); - ~ObjectFactory(); - - virtual Ice::ObjectPtr create(const std::string&); - - virtual void destroy(); - - bool add(PyObject*, const std::string&); - bool remove(const std::string&); - PyObject* find(const std::string&); - -private: - - typedef std::map<std::string, PyObject*> FactoryMap; - FactoryMap _factoryMap; -}; -typedef IceUtil::Handle<ObjectFactory> ObjectFactoryPtr; - -} - -#endif diff --git a/python/modules/IcePy/Operation.cpp b/python/modules/IcePy/Operation.cpp index 47dab4af475..76b1b5e419c 100644 --- a/python/modules/IcePy/Operation.cpp +++ b/python/modules/IcePy/Operation.cpp @@ -125,7 +125,7 @@ protected: enum MappingType { SyncMapping, AsyncMapping, OldAsyncMapping }; - bool prepareRequest(PyObject*, MappingType, Ice::OutputStreamPtr&, pair<const Ice::Byte*, const Ice::Byte*>&); + bool prepareRequest(PyObject*, MappingType, Ice::OutputStream*, pair<const Ice::Byte*, const Ice::Byte*>&); PyObject* unmarshalResults(const pair<const Ice::Byte*, const Ice::Byte*>&); PyObject* unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>&); bool validateException(PyObject*) const; @@ -378,27 +378,18 @@ struct AsyncResultObject extern PyTypeObject OperationType; extern PyTypeObject AMDCallbackType; -class UserExceptionReaderFactoryI : public Ice::UserExceptionReaderFactory +class UserExceptionFactory : public Ice::UserExceptionFactory { public: - UserExceptionReaderFactoryI(const Ice::CommunicatorPtr& communicator) : - _communicator(communicator) - { - } - - virtual void createAndThrow(const string& id) const + virtual void createAndThrow(const string& id) { ExceptionInfoPtr info = lookupExceptionInfo(id); if(info) { - throw ExceptionReader(_communicator, info); + throw ExceptionReader(info); } } - -private: - - const Ice::CommunicatorPtr _communicator; }; } @@ -1498,7 +1489,7 @@ IcePy::TypedInvocation::TypedInvocation(const Ice::ObjectPrx& prx, const Operati } bool -IcePy::TypedInvocation::prepareRequest(PyObject* args, MappingType mapping, Ice::OutputStreamPtr& os, +IcePy::TypedInvocation::prepareRequest(PyObject* args, MappingType mapping, Ice::OutputStream* os, pair<const Ice::Byte*, const Ice::Byte*>& params) { assert(PyTuple_Check(args)); @@ -1536,7 +1527,6 @@ IcePy::TypedInvocation::prepareRequest(PyObject* args, MappingType mapping, Ice: // // Marshal the in parameters. // - os = Ice::createOutputStream(_communicator); os->startEncapsulation(_prx->ice_getEncodingVersion(), _op->format); ObjectMap objectMap; @@ -1599,7 +1589,7 @@ IcePy::TypedInvocation::prepareRequest(PyObject* args, MappingType mapping, Ice: if(_op->sendsClasses) { - os->writePendingObjects(); + os->writePendingValues(); } os->endEncapsulation(); @@ -1632,17 +1622,17 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: PyObjectHandle results = PyTuple_New(numResults); if(results.get() && numResults > 0) { - Ice::InputStreamPtr is = Ice::wrapInputStream(_communicator, bytes); + Ice::InputStream is(_communicator, bytes); // - // Store a pointer to a local SlicedDataUtil object as the stream's closure. + // Store a pointer to a local StreamUtil object as the stream's closure. // This is necessary to support object unmarshaling (see ObjectReader). // - SlicedDataUtil util; - assert(!is->closure()); - is->closure(&util); + StreamUtil util; + assert(!is.getClosure()); + is.setClosure(&util); - is->startEncapsulation(); + is.startEncapsulation(); ParamInfoList::iterator p; @@ -1655,7 +1645,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: if(!info->optional) { void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos)); - info->type->unmarshal(is, info, results.get(), closure, false, &info->metaData); + info->type->unmarshal(&is, info, results.get(), closure, false, &info->metaData); } } @@ -1666,7 +1656,7 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: { assert(_op->returnType->pos == 0); void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(_op->returnType->pos)); - _op->returnType->type->unmarshal(is, _op->returnType, results.get(), closure, false, &_op->metaData); + _op->returnType->type->unmarshal(&is, _op->returnType, results.get(), closure, false, &_op->metaData); } // @@ -1675,10 +1665,10 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: for(p = _op->optionalOutParams.begin(); p != _op->optionalOutParams.end(); ++p) { ParamInfoPtr info = *p; - if(is->readOptional(info->tag, info->type->optionalFormat())) + if(is.readOptional(info->tag, info->type->optionalFormat())) { void* closure = reinterpret_cast<void*>(static_cast<Py_ssize_t>(info->pos)); - info->type->unmarshal(is, info, results.get(), closure, true, &info->metaData); + info->type->unmarshal(&is, info, results.get(), closure, true, &info->metaData); } else { @@ -1692,12 +1682,12 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: if(_op->returnsClasses) { - is->readPendingObjects(); + is.readPendingValues(); } - is->endEncapsulation(); + is.endEncapsulation(); - util.update(); + util.updateSlicedData(); } return results.release(); @@ -1706,37 +1696,37 @@ IcePy::TypedInvocation::unmarshalResults(const pair<const Ice::Byte*, const Ice: PyObject* IcePy::TypedInvocation::unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>& bytes) { - Ice::InputStreamPtr is = Ice::wrapInputStream(_communicator, bytes); + Ice::InputStream is(_communicator, bytes); // - // Store a pointer to a local SlicedDataUtil object as the stream's closure. + // Store a pointer to a local StreamUtil object as the stream's closure. // This is necessary to support object unmarshaling (see ObjectReader). // - SlicedDataUtil util; - assert(!is->closure()); - is->closure(&util); + StreamUtil util; + assert(!is.getClosure()); + is.setClosure(&util); - is->startEncapsulation(); + is.startEncapsulation(); try { - Ice::UserExceptionReaderFactoryPtr factory = new UserExceptionReaderFactoryI(_communicator); - is->throwException(factory); + Ice::UserExceptionFactoryPtr factory = new UserExceptionFactory; + is.throwException(factory); } catch(const ExceptionReader& r) { - is->endEncapsulation(); + is.endEncapsulation(); PyObject* ex = r.getException(); if(validateException(ex)) { - util.update(); + util.updateSlicedData(); Ice::SlicedDataPtr slicedData = r.getSlicedData(); if(slicedData) { - SlicedDataUtil::setMember(ex, slicedData); + StreamUtil::setSlicedDataMember(ex, slicedData); } Py_INCREF(ex); @@ -1800,9 +1790,9 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) // // Marshal the input parameters to a byte sequence. // - Ice::OutputStreamPtr os; + Ice::OutputStream os(_communicator); pair<const Ice::Byte*, const Ice::Byte*> params; - if(!prepareRequest(pyparams, SyncMapping, os, params)) + if(!prepareRequest(pyparams, SyncMapping, &os, params)) { return 0; } @@ -2004,9 +1994,9 @@ IcePy::AsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) // // Marshal the input parameters to a byte sequence. // - Ice::OutputStreamPtr os; + Ice::OutputStream os(_communicator); pair<const Ice::Byte*, const Ice::Byte*> params; - if(!prepareRequest(pyparams, AsyncMapping, os, params)) + if(!prepareRequest(pyparams, AsyncMapping, &os, params)) { return 0; } @@ -2289,9 +2279,9 @@ IcePy::OldAsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) // // Marshal the input parameters to a byte sequence. // - Ice::OutputStreamPtr os; + Ice::OutputStream os(_communicator); pair<const Ice::Byte*, const Ice::Byte*> params; - if(!prepareRequest(pyparams, OldAsyncMapping, os, params)) + if(!prepareRequest(pyparams, OldAsyncMapping, &os, params)) { return 0; } @@ -3246,19 +3236,19 @@ IcePy::TypedUpcall::dispatch(PyObject* servant, const pair<const Ice::Byte*, con if(!_op->inParams.empty()) { - Ice::InputStreamPtr is = Ice::wrapInputStream(_communicator, inBytes); + Ice::InputStream is(_communicator, inBytes); // - // Store a pointer to a local SlicedDataUtil object as the stream's closure. + // Store a pointer to a local StreamUtil object as the stream's closure. // This is necessary to support object unmarshaling (see ObjectReader). // - SlicedDataUtil util; - assert(!is->closure()); - is->closure(&util); + StreamUtil util; + assert(!is.getClosure()); + is.setClosure(&util); try { - is->startEncapsulation(); + is.startEncapsulation(); ParamInfoList::iterator p; @@ -3271,7 +3261,7 @@ IcePy::TypedUpcall::dispatch(PyObject* servant, const pair<const Ice::Byte*, con if(!info->optional) { void* closure = reinterpret_cast<void*>(info->pos + offset); - info->type->unmarshal(is, info, args.get(), closure, false, &info->metaData); + info->type->unmarshal(&is, info, args.get(), closure, false, &info->metaData); } } @@ -3281,10 +3271,10 @@ IcePy::TypedUpcall::dispatch(PyObject* servant, const pair<const Ice::Byte*, con for(p = _op->optionalInParams.begin(); p != _op->optionalInParams.end(); ++p) { ParamInfoPtr info = *p; - if(is->readOptional(info->tag, info->type->optionalFormat())) + if(is.readOptional(info->tag, info->type->optionalFormat())) { void* closure = reinterpret_cast<void*>(info->pos + offset); - info->type->unmarshal(is, info, args.get(), closure, true, &info->metaData); + info->type->unmarshal(&is, info, args.get(), closure, true, &info->metaData); } else { @@ -3298,12 +3288,12 @@ IcePy::TypedUpcall::dispatch(PyObject* servant, const pair<const Ice::Byte*, con if(_op->sendsClasses) { - is->readPendingObjects(); + is.readPendingValues(); } - is->endEncapsulation(); + is.endEncapsulation(); - util.update(); + util.updateSlicedData(); } catch(const AbortMarshaling&) { @@ -3394,7 +3384,7 @@ IcePy::TypedUpcall::response(PyObject* args, const Ice::EncodingVersion& encodin // Marshal the results. If there is more than one value to be returned, then they must be // returned in a tuple of the form (result, outParam1, ...). // - Ice::OutputStreamPtr os = Ice::createOutputStream(_communicator); + Ice::OutputStream os(_communicator); try { Py_ssize_t numResults = static_cast<Py_ssize_t>(_op->outParams.size()); @@ -3433,7 +3423,7 @@ IcePy::TypedUpcall::response(PyObject* args, const Ice::EncodingVersion& encodin } Py_INCREF(args); - os->startEncapsulation(encoding, _op->format); + os.startEncapsulation(encoding, _op->format); ObjectMap objectMap; ParamInfoList::iterator p; @@ -3478,7 +3468,7 @@ IcePy::TypedUpcall::response(PyObject* args, const Ice::EncodingVersion& encodin if(!info->optional) { PyObject* arg = PyTuple_GET_ITEM(t.get(), info->pos); - info->type->marshal(arg, os, &objectMap, false, &info->metaData); + info->type->marshal(arg, &os, &objectMap, false, &info->metaData); } } @@ -3488,7 +3478,7 @@ IcePy::TypedUpcall::response(PyObject* args, const Ice::EncodingVersion& encodin if(_op->returnType && !_op->returnType->optional) { PyObject* res = PyTuple_GET_ITEM(t.get(), 0); - _op->returnType->type->marshal(res, os, &objectMap, false, &_op->metaData); + _op->returnType->type->marshal(res, &os, &objectMap, false, &_op->metaData); } // @@ -3498,21 +3488,21 @@ IcePy::TypedUpcall::response(PyObject* args, const Ice::EncodingVersion& encodin { ParamInfoPtr info = *p; PyObject* arg = PyTuple_GET_ITEM(t.get(), info->pos); - if(arg != Unset && os->writeOptional(info->tag, info->type->optionalFormat())) + if(arg != Unset && os.writeOptional(info->tag, info->type->optionalFormat())) { - info->type->marshal(arg, os, &objectMap, true, &info->metaData); + info->type->marshal(arg, &os, &objectMap, true, &info->metaData); } } if(_op->returnsClasses) { - os->writePendingObjects(); + os.writePendingValues(); } - os->endEncapsulation(); + os.endEncapsulation(); AllowThreads allowThreads; // Release Python's global interpreter lock during blocking calls. - _callback->ice_response(true, os->finished()); + _callback->ice_response(true, os.finished()); } catch(const AbortMarshaling&) { @@ -3569,16 +3559,16 @@ IcePy::TypedUpcall::exception(PyException& ex, const Ice::EncodingVersion& encod } else { - Ice::OutputStreamPtr os = Ice::createOutputStream(_communicator); - os->startEncapsulation(encoding, _op->format); + Ice::OutputStream os(_communicator); + os.startEncapsulation(encoding, _op->format); - ExceptionWriter writer(_communicator, ex.ex, info); - os->writeException(writer); + ExceptionWriter writer(ex.ex, info); + os.writeException(writer); - os->endEncapsulation(); + os.endEncapsulation(); AllowThreads allowThreads; // Release Python's global interpreter lock during blocking calls. - _callback->ice_response(false, os->finished()); + _callback->ice_response(false, os.finished()); } } else diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp index 655c2bf685b..d9b2704b2a8 100644 --- a/python/modules/IcePy/Proxy.cpp +++ b/python/modules/IcePy/Proxy.cpp @@ -145,9 +145,7 @@ proxyCompare(ProxyObject* p1, PyObject* other, int op) } } - PyObject* r = result ? getTrue() : getFalse(); - Py_INCREF(r); - return r; + return result ? incTrue() : incFalse(); } #ifdef WIN32 @@ -1598,8 +1596,8 @@ proxyIceTimeout(ProxyObject* self, PyObject* args) } catch(const IceUtil::IllegalArgumentException& ex) { - PyErr_Format(PyExc_RuntimeError, "%s", STRCAST(ex.reason().c_str())); - return 0; + PyErr_Format(PyExc_RuntimeError, "%s", STRCAST(ex.reason().c_str())); + return 0; } catch(const Ice::Exception& ex) { diff --git a/python/modules/IcePy/Slice.cpp b/python/modules/IcePy/Slice.cpp index a4692f6465f..28749bf3439 100644 --- a/python/modules/IcePy/Slice.cpp +++ b/python/modules/IcePy/Slice.cpp @@ -227,7 +227,7 @@ IcePy_compile(PyObject* /*self*/, PyObject* args) char** argv = new char*[argSeq.size()]; for(size_t i = 0; i < argSeq.size(); ++i) { - argv[i] = const_cast<char*>(argSeq[i].c_str()); + argv[i] = const_cast<char*>(argSeq[i].c_str()); } int rc; @@ -238,22 +238,22 @@ IcePy_compile(PyObject* /*self*/, PyObject* args) catch(const std::exception& ex) { getErrorStream() << argv[0] << ": error:" << ex.what() << endl; - rc = EXIT_FAILURE; + rc = EXIT_FAILURE; } catch(const std::string& msg) { getErrorStream() << argv[0] << ": error:" << msg << endl; - rc = EXIT_FAILURE; + rc = EXIT_FAILURE; } catch(const char* msg) { getErrorStream() << argv[0] << ": error:" << msg << endl; - rc = EXIT_FAILURE; + rc = EXIT_FAILURE; } catch(...) { getErrorStream() << argv[0] << ": error:" << "unknown exception" << endl; - rc = EXIT_FAILURE; + rc = EXIT_FAILURE; } delete[] argv; diff --git a/python/modules/IcePy/Types.cpp b/python/modules/IcePy/Types.cpp index 895f47e1cba..59be1eb8ab5 100644 --- a/python/modules/IcePy/Types.cpp +++ b/python/modules/IcePy/Types.cpp @@ -17,7 +17,9 @@ #include <Util.h> #include <IceUtil/InputUtil.h> #include <IceUtil/ScopedArray.h> +#include <Ice/InputStream.h> #include <Ice/LocalException.h> +#include <Ice/OutputStream.h> #include <Ice/SlicedData.h> #include <list> @@ -51,23 +53,6 @@ public: }; static InfoMapDestroyer infoMapDestroyer; -class ReadObjectCallback : public Ice::ReadObjectCallback -{ -public: - - ReadObjectCallback(const ClassInfoPtr&, const UnmarshalCallbackPtr&, PyObject*, void*); - ~ReadObjectCallback(); - - virtual void invoke(const ::Ice::ObjectPtr&); - -private: - - ClassInfoPtr _info; - UnmarshalCallbackPtr _cb; - PyObject* _target; - void* _closure; -}; - struct TypeInfoObject { PyObject_HEAD @@ -84,7 +69,7 @@ extern PyTypeObject TypeInfoType; extern PyTypeObject ExceptionInfoType; bool -writeString(PyObject* p, const Ice::OutputStreamPtr& os) +writeString(PyObject* p, Ice::OutputStream* os) { if(p == Py_None) { @@ -273,16 +258,16 @@ addExceptionInfo(const string& id, const ExceptionInfoPtr& info) } // -// SlicedDataUtil implementation +// StreamUtil implementation // -PyObject* IcePy::SlicedDataUtil::_slicedDataType = 0; -PyObject* IcePy::SlicedDataUtil::_sliceInfoType = 0; +PyObject* IcePy::StreamUtil::_slicedDataType = 0; +PyObject* IcePy::StreamUtil::_sliceInfoType = 0; -IcePy::SlicedDataUtil::SlicedDataUtil() +IcePy::StreamUtil::StreamUtil() { } -IcePy::SlicedDataUtil::~SlicedDataUtil() +IcePy::StreamUtil::~StreamUtil() { // // Make sure we break any cycles among the ObjectReaders in preserved slices. @@ -293,35 +278,41 @@ IcePy::SlicedDataUtil::~SlicedDataUtil() for(Ice::SliceInfoSeq::const_iterator q = slicedData->slices.begin(); q != slicedData->slices.end(); ++q) { // - // Don't just call (*q)->objects.clear(), as releasing references - // to the objects could have unexpected side effects. We exchange + // Don't just call (*q)->instances.clear(), as releasing references + // to the instances could have unexpected side effects. We exchange // the vector into a temporary and then let the temporary fall out // of scope. // vector<Ice::ObjectPtr> tmp; - tmp.swap((*q)->objects); + tmp.swap((*q)->instances); } } } void -IcePy::SlicedDataUtil::add(const ObjectReaderPtr& reader) +IcePy::StreamUtil::add(const ReadObjectCallbackPtr& callback) +{ + _callbacks.push_back(callback); +} + +void +IcePy::StreamUtil::add(const ObjectReaderPtr& reader) { assert(reader->getSlicedData()); _readers.insert(reader); } void -IcePy::SlicedDataUtil::update() +IcePy::StreamUtil::updateSlicedData() { for(set<ObjectReaderPtr>::iterator p = _readers.begin(); p != _readers.end(); ++p) { - setMember((*p)->getObject(), (*p)->getSlicedData()); + setSlicedDataMember((*p)->getObject(), (*p)->getSlicedData()); } } void -IcePy::SlicedDataUtil::setMember(PyObject* obj, const Ice::SlicedDataPtr& slicedData) +IcePy::StreamUtil::setSlicedDataMember(PyObject* obj, const Ice::SlicedDataPtr& slicedData) { // // Create a Python equivalent of the SlicedData object. @@ -430,27 +421,27 @@ IcePy::SlicedDataUtil::setMember(PyObject* obj, const Ice::SlicedDataPtr& sliced } // - // objects + // instances // - PyObjectHandle objects = PyTuple_New((*p)->objects.size()); - if(!objects.get() || PyObject_SetAttrString(slice.get(), STRCAST("objects"), objects.get()) < 0) + PyObjectHandle instances = PyTuple_New((*p)->instances.size()); + if(!instances.get() || PyObject_SetAttrString(slice.get(), STRCAST("instances"), instances.get()) < 0) { assert(PyErr_Occurred()); throw AbortMarshaling(); } int j = 0; - for(vector<Ice::ObjectPtr>::iterator q = (*p)->objects.begin(); q != (*p)->objects.end(); ++q) + for(vector<Ice::ObjectPtr>::iterator q = (*p)->instances.begin(); q != (*p)->instances.end(); ++q) { // - // Each element in the objects list is an instance of ObjectReader that wraps a Python object. + // Each element in the instances list is an instance of ObjectReader that wraps a Python object. // assert(*q); ObjectReaderPtr r = ObjectReaderPtr::dynamicCast(*q); assert(r); PyObject* obj = r->getObject(); assert(obj != Py_None); // Should be non-nil. - PyTuple_SET_ITEM(objects.get(), j++, obj); + PyTuple_SET_ITEM(instances.get(), j++, obj); Py_INCREF(obj); // PyTuple_SET_ITEM steals a reference. } @@ -487,7 +478,7 @@ IcePy::SlicedDataUtil::setMember(PyObject* obj, const Ice::SlicedDataPtr& sliced // named _ice_slicedData which is an instance of the Python class Ice.SlicedData. // Ice::SlicedDataPtr -IcePy::SlicedDataUtil::getMember(PyObject* obj, ObjectMap* objectMap) +IcePy::StreamUtil::getSlicedDataMember(PyObject* obj, ObjectMap* objectMap) { Ice::SlicedDataPtr slicedData; @@ -537,13 +528,13 @@ IcePy::SlicedDataUtil::getMember(PyObject* obj, ObjectMap* objectMap) vector<Ice::Byte> vtmp(reinterpret_cast<Ice::Byte*>(str), reinterpret_cast<Ice::Byte*>(str + strsz)); info->bytes.swap(vtmp); - PyObjectHandle objects = PyObject_GetAttrString(s.get(), STRCAST("objects")); - assert(objects.get()); - assert(PyTuple_Check(objects.get())); - Py_ssize_t osz = PyTuple_GET_SIZE(objects.get()); + PyObjectHandle instances = PyObject_GetAttrString(s.get(), STRCAST("instances")); + assert(instances.get()); + assert(PyTuple_Check(instances.get())); + Py_ssize_t osz = PyTuple_GET_SIZE(instances.get()); for(Py_ssize_t j = 0; j < osz; ++j) { - PyObject* o = PyTuple_GET_ITEM(objects.get(), j); + PyObject* o = PyTuple_GET_ITEM(instances.get(), j); Ice::ObjectPtr writer; @@ -558,7 +549,7 @@ IcePy::SlicedDataUtil::getMember(PyObject* obj, ObjectMap* objectMap) writer = i->second; } - info->objects.push_back(writer); + info->instances.push_back(writer); } PyObjectHandle hasOptionalMembers = PyObject_GetAttrString(s.get(), STRCAST("hasOptionalMembers")); @@ -837,7 +828,7 @@ IcePy::PrimitiveInfo::optionalFormat() const } void -IcePy::PrimitiveInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap*, bool, const Ice::StringSeq*) +IcePy::PrimitiveInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap*, bool, const Ice::StringSeq*) { switch(kind) { @@ -917,7 +908,7 @@ IcePy::PrimitiveInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec } void -IcePy::PrimitiveInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::PrimitiveInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool, const Ice::StringSeq*) { switch(kind) @@ -1078,7 +1069,7 @@ IcePy::EnumInfo::optionalFormat() const } void -IcePy::EnumInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap*, bool optional, const Ice::StringSeq*) +IcePy::EnumInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap*, bool optional, const Ice::StringSeq*) { // // Validate value. @@ -1094,7 +1085,7 @@ IcePy::EnumInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* } void -IcePy::EnumInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::EnumInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool, const Ice::StringSeq*) { Ice::Int val = is->readEnum(maxValue); @@ -1194,7 +1185,7 @@ convertDataMembers(PyObject* members, DataMemberList& reqMembers, DataMemberList { PyObject* m = PyTuple_GET_ITEM(members, i); assert(PyTuple_Check(m)); - assert(PyTuple_GET_SIZE(m) == allowOptional ? 5 : 3); + assert(PyTuple_GET_SIZE(m) == (allowOptional ? 5 : 3)); PyObject* name = PyTuple_GET_ITEM(m, 0); // Member name. assert(checkString(name)); @@ -1332,7 +1323,7 @@ IcePy::StructInfo::usesClasses() const } void -IcePy::StructInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap, bool optional, +IcePy::StructInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional, const Ice::StringSeq*) { assert(p == Py_None || PyObject_IsInstance(p, pythonType.get()) == 1); // validate() should have caught this. @@ -1389,7 +1380,7 @@ IcePy::StructInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMa } void -IcePy::StructInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::StructInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool optional, const Ice::StringSeq*) { PyObjectHandle p = instantiate(pythonType.get()); @@ -1533,7 +1524,7 @@ IcePy::SequenceInfo::usesClasses() const } void -IcePy::SequenceInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap, bool optional, +IcePy::SequenceInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional, const Ice::StringSeq* metaData) { PrimitiveInfoPtr pi = PrimitiveInfoPtr::dynamicCast(elementType); @@ -1632,7 +1623,7 @@ IcePy::SequenceInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Object } void -IcePy::SequenceInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::SequenceInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool optional, const Ice::StringSeq* metaData) { if(optional) @@ -1777,7 +1768,7 @@ IcePy::SequenceInfo::getSequence(const PrimitiveInfoPtr& pi, PyObject* p) } void -IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObject* p, const Ice::OutputStreamPtr& os) +IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObject* p, Ice::OutputStream* os) { // // For most types, we accept an object that implements the buffer protocol @@ -2080,7 +2071,7 @@ IcePy::SequenceInfo::marshalPrimitiveSequence(const PrimitiveInfoPtr& pi, PyObje } void -IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, const Ice::InputStreamPtr& is, +IcePy::SequenceInfo::unmarshalPrimitiveSequence(const PrimitiveInfoPtr& pi, Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, const SequenceMappingPtr& sm) { @@ -2434,7 +2425,7 @@ IcePy::CustomInfo::usesClasses() const } void -IcePy::CustomInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap, bool, +IcePy::CustomInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool, const Ice::StringSeq* metaData) { assert(PyObject_IsInstance(p, pythonType.get()) == 1); // validate() should have caught this. @@ -2469,7 +2460,7 @@ IcePy::CustomInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMa } void -IcePy::CustomInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::CustomInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool, const Ice::StringSeq* metaData) { // @@ -2606,7 +2597,7 @@ IcePy::DictionaryInfo::usesClasses() const } void -IcePy::DictionaryInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap, bool optional, +IcePy::DictionaryInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool optional, const Ice::StringSeq*) { if(p != Py_None && !PyDict_Check(p)) @@ -2666,7 +2657,7 @@ IcePy::DictionaryInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Obje } void -IcePy::DictionaryInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::DictionaryInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool optional, const Ice::StringSeq*) { if(optional) @@ -2876,7 +2867,7 @@ IcePy::ClassInfo::usesClasses() const } void -IcePy::ClassInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap, bool, +IcePy::ClassInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap, bool, const Ice::StringSeq*) { if(!pythonType.get()) @@ -2887,7 +2878,8 @@ IcePy::ClassInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap if(p == Py_None) { - os->writeObject(0); + Ice::ObjectPtr nil; + os->write(nil); return; } @@ -2919,11 +2911,24 @@ IcePy::ClassInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap // // Give the writer to the stream. The stream will eventually call write() on it. // - os->writeObject(writer); + os->write(writer); +} + +namespace +{ + +void +patchObject(void* addr, const Ice::ObjectPtr& v) +{ + ReadObjectCallback* cb = static_cast<ReadObjectCallback*>(addr); + assert(cb); + cb->invoke(v); +} + } void -IcePy::ClassInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::ClassInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool, const Ice::StringSeq*) { if(!pythonType.get()) @@ -2932,7 +2937,16 @@ IcePy::ClassInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallba throw AbortMarshaling(); } - is->readObject(new ReadObjectCallback(this, cb, target, closure)); + // + // This callback is notified when the Slice value is actually read. The StreamUtil object + // attached to the stream keeps a reference to the callback object to ensure it lives + // long enough. + // + ReadObjectCallbackPtr rocb = new ReadObjectCallback(this, cb, target, closure); + StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure()); + assert(util); + util->add(rocb); + is->read(patchObject, rocb.get()); } void @@ -3094,7 +3108,7 @@ IcePy::ProxyInfo::optionalFormat() const } void -IcePy::ProxyInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap*, bool optional, const Ice::StringSeq*) +IcePy::ProxyInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap*, bool optional, const Ice::StringSeq*) { Ice::OutputStream::size_type sizePos = 0; if(optional) @@ -3122,7 +3136,7 @@ IcePy::ProxyInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap } void -IcePy::ProxyInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallbackPtr& cb, PyObject* target, +IcePy::ProxyInfo::unmarshal(Ice::InputStream* is, const UnmarshalCallbackPtr& cb, PyObject* target, void* closure, bool optional, const Ice::StringSeq*) { if(optional) @@ -3145,7 +3159,7 @@ IcePy::ProxyInfo::unmarshal(const Ice::InputStreamPtr& is, const UnmarshalCallba throw AbortMarshaling(); } - PyObjectHandle p = createProxy(proxy, is->communicator(), pythonType.get()); + PyObjectHandle p = createProxy(proxy, proxy->ice_getCommunicator(), pythonType.get()); cb->unmarshaled(p.get(), target, closure); } @@ -3218,7 +3232,7 @@ IcePy::ObjectWriter::ice_preMarshal() } void -IcePy::ObjectWriter::write(const Ice::OutputStreamPtr& os) const +IcePy::ObjectWriter::__write(Ice::OutputStream* os) const { Ice::SlicedDataPtr slicedData; @@ -3227,10 +3241,10 @@ IcePy::ObjectWriter::write(const Ice::OutputStreamPtr& os) const // // Retrieve the SlicedData object that we stored as a hidden member of the Python object. // - slicedData = SlicedDataUtil::getMember(_object, const_cast<ObjectMap*>(_map)); + slicedData = StreamUtil::getSlicedDataMember(_object, const_cast<ObjectMap*>(_map)); } - os->startObject(slicedData); + os->startValue(slicedData); if(_info->id != "::Ice::UnknownSlicedObject") { @@ -3248,11 +3262,17 @@ IcePy::ObjectWriter::write(const Ice::OutputStreamPtr& os) const } } - os->endObject(); + os->endValue(); } void -IcePy::ObjectWriter::writeMembers(const Ice::OutputStreamPtr& os, const DataMemberList& members) const +IcePy::ObjectWriter::__read(Ice::InputStream*) +{ + assert(false); +} + +void +IcePy::ObjectWriter::writeMembers(Ice::OutputStream* os, const DataMemberList& members) const { for(DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q) { @@ -3321,9 +3341,15 @@ IcePy::ObjectReader::ice_postUnmarshal() } void -IcePy::ObjectReader::read(const Ice::InputStreamPtr& is) +IcePy::ObjectReader::__write(Ice::OutputStream*) const +{ + assert(false); +} + +void +IcePy::ObjectReader::__read(Ice::InputStream* is) { - is->startObject(); + is->startValue(); const bool unknown = _info->id == "::Ice::UnknownSlicedObject"; @@ -3368,11 +3394,11 @@ IcePy::ObjectReader::read(const Ice::InputStreamPtr& is) } } - _slicedData = is->endObject(_info->preserve); + _slicedData = is->endValue(_info->preserve); if(_slicedData) { - SlicedDataUtil* util = reinterpret_cast<SlicedDataUtil*>(is->closure()); + StreamUtil* util = reinterpret_cast<StreamUtil*>(is->getClosure()); assert(util); util->add(this); @@ -3480,7 +3506,7 @@ IcePy::ReadObjectCallback::invoke(const Ice::ObjectPtr& p) // ExceptionInfo implementation. // void -IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap* objectMap) +IcePy::ExceptionInfo::marshal(PyObject* p, Ice::OutputStream* os, ObjectMap* objectMap) { if(!PyObject_IsInstance(p, pythonType.get())) { @@ -3495,7 +3521,7 @@ IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec // // Retrieve the SlicedData object that we stored as a hidden member of the Python object. // - slicedData = SlicedDataUtil::getMember(p, objectMap); + slicedData = StreamUtil::getSlicedDataMember(p, objectMap); } os->startException(slicedData); @@ -3517,7 +3543,7 @@ IcePy::ExceptionInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Objec } void -IcePy::ExceptionInfo::writeMembers(PyObject* p, const Ice::OutputStreamPtr& os, const DataMemberList& members, +IcePy::ExceptionInfo::writeMembers(PyObject* p, Ice::OutputStream* os, const DataMemberList& members, ObjectMap* objectMap) const { for(DataMemberList::const_iterator q = members.begin(); q != members.end(); ++q) @@ -3559,7 +3585,7 @@ IcePy::ExceptionInfo::writeMembers(PyObject* p, const Ice::OutputStreamPtr& os, } PyObject* -IcePy::ExceptionInfo::unmarshal(const Ice::InputStreamPtr& is) +IcePy::ExceptionInfo::unmarshal(Ice::InputStream* is) { PyObjectHandle p = createExceptionInstance(pythonType.get()); @@ -3669,9 +3695,8 @@ IcePy::ExceptionInfo::printMembers(PyObject* value, IceUtilInternal::Output& out // // ExceptionWriter implementation. // -IcePy::ExceptionWriter::ExceptionWriter(const Ice::CommunicatorPtr& communicator, const PyObjectHandle& ex, - const ExceptionInfoPtr& info) : - Ice::UserExceptionWriter(communicator), _ex(ex), _info(info) +IcePy::ExceptionWriter::ExceptionWriter(const PyObjectHandle& ex, const ExceptionInfoPtr& info) : + _ex(ex), _info(info) { if(!info) { @@ -3689,31 +3714,19 @@ IcePy::ExceptionWriter::~ExceptionWriter() throw() _ex = 0; } -void -IcePy::ExceptionWriter::write(const Ice::OutputStreamPtr& os) const -{ - AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - - _info->marshal(_ex.get(), os, const_cast<ObjectMap*>(&_objects)); -} - -bool -IcePy::ExceptionWriter::usesClasses() const -{ - return _info->usesClasses; -} - string -IcePy::ExceptionWriter::ice_name() const +IcePy::ExceptionWriter::ice_id() const { return _info->id; } +#ifndef ICE_CPP11_MAPPING Ice::UserException* IcePy::ExceptionWriter::ice_clone() const { return new ExceptionWriter(*this); } +#endif void IcePy::ExceptionWriter::ice_throw() const @@ -3721,51 +3734,54 @@ IcePy::ExceptionWriter::ice_throw() const throw *this; } -// -// ExceptionReader implementation. -// -IcePy::ExceptionReader::ExceptionReader(const Ice::CommunicatorPtr& communicator, const ExceptionInfoPtr& info) : - Ice::UserExceptionReader(communicator), _info(info) -{ -} - -IcePy::ExceptionReader::~ExceptionReader() throw() +void +IcePy::ExceptionWriter::__write(Ice::OutputStream* os) const { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - _ex = 0; + _info->marshal(_ex.get(), os, const_cast<ObjectMap*>(&_objects)); } void -IcePy::ExceptionReader::read(const Ice::InputStreamPtr& is) const +IcePy::ExceptionWriter::__read(Ice::InputStream*) { - AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - - is->startException(); - - const_cast<PyObjectHandle&>(_ex) = _info->unmarshal(is); - - const_cast<Ice::SlicedDataPtr&>(_slicedData) = is->endException(_info->preserve); } bool -IcePy::ExceptionReader::usesClasses() const +IcePy::ExceptionWriter::__usesClasses() const { return _info->usesClasses; } +// +// ExceptionReader implementation. +// +IcePy::ExceptionReader::ExceptionReader(const ExceptionInfoPtr& info) : + _info(info) +{ +} + +IcePy::ExceptionReader::~ExceptionReader() throw() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + _ex = 0; +} + string -IcePy::ExceptionReader::ice_name() const +IcePy::ExceptionReader::ice_id() const { return _info->id; } +#ifndef ICE_CPP11_MAPPING Ice::UserException* IcePy::ExceptionReader::ice_clone() const { assert(false); return 0; } +#endif void IcePy::ExceptionReader::ice_throw() const @@ -3773,6 +3789,30 @@ IcePy::ExceptionReader::ice_throw() const throw *this; } +void +IcePy::ExceptionReader::__write(Ice::OutputStream*) const +{ + assert(false); +} + +void +IcePy::ExceptionReader::__read(Ice::InputStream* is) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + is->startException(); + + const_cast<PyObjectHandle&>(_ex) = _info->unmarshal(is); + + const_cast<Ice::SlicedDataPtr&>(_slicedData) = is->endException(_info->preserve); +} + +bool +IcePy::ExceptionReader::__usesClasses() const +{ + return _info->usesClasses; +} + PyObject* IcePy::ExceptionReader::getException() const { diff --git a/python/modules/IcePy/Types.h b/python/modules/IcePy/Types.h index 5ac90aece33..921047496b9 100644 --- a/python/modules/IcePy/Types.h +++ b/python/modules/IcePy/Types.h @@ -12,7 +12,9 @@ #include <Config.h> #include <Util.h> -#include <Ice/Stream.h> +#include <Ice/FactoryTable.h> +#include <Ice/Object.h> +#include <Ice/SlicedDataF.h> #include <IceUtil/OutputUtil.h> #include <set> @@ -41,37 +43,6 @@ class ObjectReader; typedef IceUtil::Handle<ObjectReader> ObjectReaderPtr; // -// This class keeps track of Python objects (instances of Slice classes -// and exceptions) that have preserved slices. -// -class SlicedDataUtil -{ -public: - - SlicedDataUtil(); - ~SlicedDataUtil(); - - void add(const ObjectReaderPtr&); - - void update(); - - static void setMember(PyObject*, const Ice::SlicedDataPtr&); - static Ice::SlicedDataPtr getMember(PyObject*, ObjectMap*); - -private: - - std::set<ObjectReaderPtr> _readers; - static PyObject* _slicedDataType; - static PyObject* _sliceInfoType; -}; - -struct PrintObjectHistory -{ - int index; - std::map<PyObject*, int> objects; -}; - -// // The delayed nature of class unmarshaling in the Ice protocol requires us to // handle unmarshaling using a callback strategy. An instance of UnmarshalCallback // is supplied to each type's unmarshal() member function. For all types except @@ -95,6 +66,71 @@ public: typedef IceUtil::Handle<UnmarshalCallback> UnmarshalCallbackPtr; // +// ReadObjectCallback retains all of the information necessary to store an unmarshaled +// Slice value as a Python object. +// +class ReadObjectCallback : public IceUtil::Shared +{ +public: + + ReadObjectCallback(const ClassInfoPtr&, const UnmarshalCallbackPtr&, PyObject*, void*); + ~ReadObjectCallback(); + + void invoke(const ::Ice::ObjectPtr&); + +private: + + ClassInfoPtr _info; + UnmarshalCallbackPtr _cb; + PyObject* _target; + void* _closure; +}; +typedef IceUtil::Handle<ReadObjectCallback> ReadObjectCallbackPtr; + +// +// This class assists during unmarshaling of Slice classes and exceptions. +// We attach an instance to a stream. +// +class StreamUtil +{ +public: + + StreamUtil(); + ~StreamUtil(); + + // + // Keep a reference to a ReadObjectCallback for patching purposes. + // + void add(const ReadObjectCallbackPtr&); + + // + // Keep track of object instances that have preserved slices. + // + void add(const ObjectReaderPtr&); + + // + // Updated the sliced data information for all stored object instances. + // + void updateSlicedData(); + + static void setSlicedDataMember(PyObject*, const Ice::SlicedDataPtr&); + static Ice::SlicedDataPtr getSlicedDataMember(PyObject*, ObjectMap*); + +private: + + std::vector<ReadObjectCallbackPtr> _callbacks; + std::set<ObjectReaderPtr> _readers; + static PyObject* _slicedDataType; + static PyObject* _sliceInfoType; +}; + +struct PrintObjectHistory +{ + int index; + std::map<PyObject*, int> objects; +}; + +// // Base class for type information. // class TypeInfo : public UnmarshalCallback @@ -125,8 +161,8 @@ public: // The marshal and unmarshal functions can raise Ice exceptions, and may raise // AbortMarshaling if an error occurs. // - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0) = 0; - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0) = 0; + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0) = 0; virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*) = 0; @@ -162,8 +198,8 @@ public: virtual int wireSize() const; virtual Ice::OptionalFormat optionalFormat() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -191,8 +227,8 @@ public: virtual int wireSize() const; virtual Ice::OptionalFormat optionalFormat() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -241,8 +277,8 @@ public: virtual bool usesClasses() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -282,8 +318,8 @@ public: virtual bool usesClasses() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -311,8 +347,8 @@ private: typedef IceUtil::Handle<SequenceMapping> SequenceMappingPtr; PyObject* getSequence(const PrimitiveInfoPtr&, PyObject*); - void marshalPrimitiveSequence(const PrimitiveInfoPtr&, PyObject*, const Ice::OutputStreamPtr&); - void unmarshalPrimitiveSequence(const PrimitiveInfoPtr&, const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, + void marshalPrimitiveSequence(const PrimitiveInfoPtr&, PyObject*, Ice::OutputStream*); + void unmarshalPrimitiveSequence(const PrimitiveInfoPtr&, Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, const SequenceMappingPtr&); public: @@ -342,8 +378,8 @@ public: virtual bool usesClasses() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -374,8 +410,8 @@ public: virtual bool usesClasses() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void unmarshaled(PyObject*, PyObject*, void*); @@ -424,8 +460,8 @@ public: virtual bool usesClasses() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -466,8 +502,8 @@ public: virtual int wireSize() const; virtual Ice::OptionalFormat optionalFormat() const; - virtual void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*, bool, const Ice::StringSeq* = 0); - virtual void unmarshal(const Ice::InputStreamPtr&, const UnmarshalCallbackPtr&, PyObject*, void*, bool, + virtual void marshal(PyObject*, Ice::OutputStream*, ObjectMap*, bool, const Ice::StringSeq* = 0); + virtual void unmarshal(Ice::InputStream*, const UnmarshalCallbackPtr&, PyObject*, void*, bool, const Ice::StringSeq* = 0); virtual void print(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -487,8 +523,8 @@ class ExceptionInfo : public IceUtil::Shared { public: - void marshal(PyObject*, const Ice::OutputStreamPtr&, ObjectMap*); - PyObject* unmarshal(const Ice::InputStreamPtr&); + void marshal(PyObject*, Ice::OutputStream*, ObjectMap*); + PyObject* unmarshal(Ice::InputStream*); void print(PyObject*, IceUtilInternal::Output&); void printMembers(PyObject*, IceUtilInternal::Output&, PrintObjectHistory*); @@ -503,13 +539,13 @@ public: private: - void writeMembers(PyObject*, const Ice::OutputStreamPtr&, const DataMemberList&, ObjectMap*) const; + void writeMembers(PyObject*, Ice::OutputStream*, const DataMemberList&, ObjectMap*) const; }; // // ObjectWriter wraps a Python object for marshaling. // -class ObjectWriter : public Ice::ObjectWriter +class ObjectWriter : public Ice::Object { public: @@ -518,11 +554,12 @@ public: virtual void ice_preMarshal(); - virtual void write(const Ice::OutputStreamPtr&) const; + virtual void __write(Ice::OutputStream*) const; + virtual void __read(Ice::InputStream*); private: - void writeMembers(const Ice::OutputStreamPtr&, const DataMemberList&) const; + void writeMembers(Ice::OutputStream*, const DataMemberList&) const; PyObject* _object; ObjectMap* _map; @@ -532,7 +569,7 @@ private: // // ObjectReader unmarshals the state of an Ice object. // -class ObjectReader : public Ice::ObjectReader +class ObjectReader : public Ice::Object { public: @@ -541,7 +578,8 @@ public: virtual void ice_postUnmarshal(); - virtual void read(const Ice::InputStreamPtr&); + virtual void __write(Ice::OutputStream*) const; + virtual void __read(Ice::InputStream*); virtual ClassInfoPtr getInfo() const; @@ -559,20 +597,29 @@ private: // // ExceptionWriter wraps a Python user exception for marshaling. // -class ExceptionWriter : public Ice::UserExceptionWriter +class ExceptionWriter : public Ice::UserException { public: - ExceptionWriter(const Ice::CommunicatorPtr&, const PyObjectHandle&, const ExceptionInfoPtr& = 0); + ExceptionWriter(const PyObjectHandle&, const ExceptionInfoPtr& = 0); ~ExceptionWriter() throw(); - virtual void write(const Ice::OutputStreamPtr&) const; - virtual bool usesClasses() const; - - virtual std::string ice_name() const; + virtual std::string ice_id() const; +#ifndef ICE_CPP11_MAPPING virtual Ice::UserException* ice_clone() const; +#endif virtual void ice_throw() const; + virtual void __write(Ice::OutputStream*) const; + virtual void __read(Ice::InputStream*); + + virtual bool __usesClasses() const; + +protected: + + virtual void __writeImpl(Ice::OutputStream*) const {} + virtual void __readImpl(Ice::InputStream*) {} + private: PyObjectHandle _ex; @@ -583,24 +630,36 @@ private: // // ExceptionReader creates a Python user exception and unmarshals it. // -class ExceptionReader : public Ice::UserExceptionReader +class ExceptionReader : public Ice::UserException { public: - ExceptionReader(const Ice::CommunicatorPtr&, const ExceptionInfoPtr&); + ExceptionReader(const ExceptionInfoPtr&); ~ExceptionReader() throw(); - virtual void read(const Ice::InputStreamPtr&) const; - virtual bool usesClasses() const; - - virtual std::string ice_name() const; + virtual std::string ice_id() const; +#ifndef ICE_CPP11_MAPPING virtual Ice::UserException* ice_clone() const; +#endif virtual void ice_throw() const; + virtual void __write(Ice::OutputStream*) const; + virtual void __read(Ice::InputStream*); + + virtual bool __usesClasses() const; + PyObject* getException() const; // Borrowed reference. Ice::SlicedDataPtr getSlicedData() const; + using Ice::UserException::__read; + using Ice::UserException::__write; + +protected: + + virtual void __writeImpl(Ice::OutputStream*) const {} + virtual void __readImpl(Ice::InputStream*) {} + private: ExceptionInfoPtr _info; diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp index 5182e373212..9044df85b04 100644 --- a/python/modules/IcePy/Util.cpp +++ b/python/modules/IcePy/Util.cpp @@ -311,7 +311,7 @@ IcePy::PyException::raise() } else { - PyObjectHandle name = PyObject_CallMethod(ex.get(), STRCAST("ice_name"), 0); + PyObjectHandle name = PyObject_CallMethod(ex.get(), STRCAST("ice_id"), 0); PyErr_Clear(); if(!name.get()) { @@ -818,7 +818,7 @@ convertLocalException(const Ice::LocalException& ex, PyObject* p) m = IcePy::createEncodingVersion(e.supported); PyObject_SetAttrString(p, STRCAST("supported"), m.get()); } - catch(const Ice::NoObjectFactoryException& e) + catch(const Ice::NoValueFactoryException& e) { IcePy::PyObjectHandle m; m = IcePy::createString(e.reason); @@ -880,7 +880,7 @@ IcePy::convertException(const Ice::Exception& ex) } catch(const Ice::LocalException& e) { - type = lookupType(scopedToName(e.ice_name())); + type = lookupType(scopedToName(e.ice_id())); if(type) { p = createExceptionInstance(type); diff --git a/python/modules/IcePy/Util.h b/python/modules/IcePy/Util.h index e62806ae03a..54f1df6b21f 100644 --- a/python/modules/IcePy/Util.h +++ b/python/modules/IcePy/Util.h @@ -16,7 +16,7 @@ #include <Ice/Exception.h> // -// These macros replace Py_RETURN_FALSE and Py_RETURN TRUE. We use these +// These macros replace Py_RETURN_FALSE and Py_RETURN_TRUE. We use these // instead of the standard ones in order to avoid GCC warnings about // strict aliasing and type punning. // diff --git a/python/modules/IcePy/ValueFactoryManager.cpp b/python/modules/IcePy/ValueFactoryManager.cpp new file mode 100644 index 00000000000..d1f78ddbaad --- /dev/null +++ b/python/modules/IcePy/ValueFactoryManager.cpp @@ -0,0 +1,536 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2016 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. +// +// ********************************************************************** + +#ifdef _WIN32 +# include <IceUtil/Config.h> +#endif +#include <ValueFactoryManager.h> +#include <Thread.h> +#include <Types.h> +#include <Ice/LocalException.h> + +using namespace std; +using namespace IcePy; + +namespace IcePy +{ + +struct ValueFactoryManagerObject +{ + PyObject_HEAD + ValueFactoryManagerPtr* vfm; +}; + +} + +namespace +{ + +ClassInfoPtr +getClassInfo(const string& id) +{ + ClassInfoPtr info; + + if(id == Ice::Object::ice_staticId()) + { + // + // When the ID is that of Ice::Object, it indicates that the stream has not + // found a factory and is providing us an opportunity to preserve the object. + // + info = lookupClassInfo("::Ice::UnknownSlicedObject"); + } + else + { + info = lookupClassInfo(id); + } + + return info; +} + +} + +IcePy::ValueFactoryManager::ValueFactoryManager() +{ + // + // Create a Python wrapper around this object. Note that this is cyclic - we clear the + // reference in destroy(). + // + ValueFactoryManagerObject* obj = reinterpret_cast<ValueFactoryManagerObject*>( + ValueFactoryManagerType.tp_alloc(&ValueFactoryManagerType, 0)); + assert(obj); + obj->vfm = new ValueFactoryManagerPtr(this); + _self = reinterpret_cast<PyObject*>(obj); + + _defaultFactory = new DefaultValueFactory; +} + +IcePy::ValueFactoryManager::~ValueFactoryManager() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + Py_XDECREF(_self); +} + +void +IcePy::ValueFactoryManager::add(const Ice::ValueFactoryPtr& f, const string& id) +{ + Lock lock(*this); + + if(id.empty()) + { + if(_defaultFactory->getDelegate()) + { + throw Ice::AlreadyRegisteredException(__FILE__, __LINE__, "value factory", id); + } + + _defaultFactory->setDelegate(f); + } + else + { + FactoryMap::iterator p = _factories.find(id); + if(p != _factories.end()) + { + throw Ice::AlreadyRegisteredException(__FILE__, __LINE__, "value factory", id); + } + + _factories.insert(FactoryMap::value_type(id, f)); + } +} + +Ice::ValueFactoryPtr +IcePy::ValueFactoryManager::find(const string& id) const +{ + Lock lock(*this); + + if(id.empty()) + { + return _defaultFactory; + } + + FactoryMap::const_iterator p = _factories.find(id); + if(p != _factories.end()) + { + return p->second; + } + + return 0; +} + +void +IcePy::ValueFactoryManager::add(PyObject* valueFactory, PyObject* objectFactory, const string& id) +{ + try + { + add(new FactoryWrapper(valueFactory, objectFactory), id); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + } +} + +PyObject* +IcePy::ValueFactoryManager::findValueFactory(const string& id) const +{ + Ice::ValueFactoryPtr f = find(id); + if(f) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(f); + if(w) + { + return w->getValueFactory(); + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +PyObject* +IcePy::ValueFactoryManager::findObjectFactory(const string& id) const +{ + Ice::ValueFactoryPtr f = find(id); + if(f) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(f); + if(w) + { + return w->getObjectFactory(); + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +PyObject* +IcePy::ValueFactoryManager::getObject() const +{ + Py_INCREF(_self); + return _self; +} + +void +IcePy::ValueFactoryManager::destroy() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + FactoryMap factories; + + { + Lock lock(*this); + + // + // Break the cyclic reference. + // + Py_DECREF(_self); + _self = 0; + + factories.swap(_factories); + } + + for(FactoryMap::iterator p = factories.begin(); p != factories.end(); ++p) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(p->second); + if(w) + { + w->destroy(); + } + } + + _defaultFactory->destroy(); +} + +IcePy::FactoryWrapper::FactoryWrapper(PyObject* valueFactory, PyObject* objectFactory) : + _valueFactory(valueFactory), + _objectFactory(objectFactory) +{ + Py_INCREF(_valueFactory); + Py_INCREF(_objectFactory); + assert(_valueFactory != Py_None); // This should always be present. +} + +IcePy::FactoryWrapper::~FactoryWrapper() +{ + Py_DECREF(_valueFactory); + Py_DECREF(_objectFactory); +} + +Ice::ValuePtr +IcePy::FactoryWrapper::create(const string& id) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + // + // Get the type information. + // + ClassInfoPtr info = getClassInfo(id); + + if(!info) + { + return 0; + } + + PyObjectHandle obj = PyObject_CallFunction(_valueFactory, STRCAST("s"), id.c_str()); + + if(!obj.get()) + { + assert(PyErr_Occurred()); + throw AbortMarshaling(); + } + + if(obj.get() == Py_None) + { + return 0; + } + + return new ObjectReader(obj.get(), info); +} + +PyObject* +IcePy::FactoryWrapper::getValueFactory() const +{ + Py_INCREF(_valueFactory); + return _valueFactory; +} + +PyObject* +IcePy::FactoryWrapper::getObjectFactory() const +{ + Py_INCREF(_objectFactory); + return _objectFactory; +} + +void +IcePy::FactoryWrapper::destroy() +{ + if(_objectFactory != Py_None) + { + PyObjectHandle obj = PyObject_CallMethod(_objectFactory, STRCAST("destroy"), 0); + PyErr_Clear(); // Ignore errors. + } +} + +Ice::ValuePtr +IcePy::DefaultValueFactory::create(const string& id) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + Ice::ValuePtr v; + + // + // Give the application-provided default factory a chance to create the object first. + // + if(_delegate) + { + v = _delegate->create(id); + if(v) + { + return v; + } + } + + // + // Get the type information. + // + ClassInfoPtr info = getClassInfo(id); + + if(!info) + { + return 0; + } + + // + // If the requested type is an abstract class, then we give up. + // + if(info->isAbstract) + { + return 0; + } + + // + // Instantiate the object. + // + PyTypeObject* type = reinterpret_cast<PyTypeObject*>(info->pythonType.get()); + PyObjectHandle args = PyTuple_New(0); + PyObjectHandle obj = type->tp_new(type, args.get(), 0); + if(!obj.get()) + { + assert(PyErr_Occurred()); + throw AbortMarshaling(); + } + + return new ObjectReader(obj.get(), info); +} + +void +IcePy::DefaultValueFactory::setDelegate(const Ice::ValueFactoryPtr& d) +{ + _delegate = d; +} + +PyObject* +IcePy::DefaultValueFactory::getValueFactory() const +{ + if(_delegate) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(_delegate); + if(w) + { + return w->getValueFactory(); + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +PyObject* +IcePy::DefaultValueFactory::getObjectFactory() const +{ + if(_delegate) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(_delegate); + if(w) + { + return w->getObjectFactory(); + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +void +IcePy::DefaultValueFactory::destroy() +{ + if(_delegate) + { + FactoryWrapperPtr w = FactoryWrapperPtr::dynamicCast(_delegate); + if(w) + { + w->destroy(); + } + } + + _delegate = 0; +} + +#ifdef WIN32 +extern "C" +#endif +static ValueFactoryManagerObject* +valueFactoryManagerNew(PyTypeObject* /*type*/, PyObject* /*args*/, PyObject* /*kwds*/) +{ + PyErr_Format(PyExc_RuntimeError, STRCAST("Do not instantiate this object directly")); + return 0; +} + +#ifdef WIN32 +extern "C" +#endif +static void +valueFactoryManagerDealloc(ValueFactoryManagerObject* self) +{ + delete self->vfm; + Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self)); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +valueFactoryManagerAdd(ValueFactoryManagerObject* self, PyObject* args) +{ + assert(self->vfm); + + PyObject* factoryType = lookupType("types.FunctionType"); + assert(factoryType); + + PyObject* factory; + PyObject* idObj; + if(!PyArg_ParseTuple(args, STRCAST("O!O"), factoryType, &factory, &idObj)) + { + return 0; + } + + string id; + if(!getStringArg(idObj, "id", id)) + { + return 0; + } + + (*self->vfm)->add(factory, Py_None, id); + if(PyErr_Occurred()) + { + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +valueFactoryManagerFind(ValueFactoryManagerObject* self, PyObject* args) +{ + assert(self->vfm); + + PyObject* idObj; + if(!PyArg_ParseTuple(args, STRCAST("O"), &idObj)) + { + return 0; + } + + string id; + if(!getStringArg(idObj, "id", id)) + { + return 0; + } + + return (*self->vfm)->findValueFactory(id); +} + +static PyMethodDef ValueFactoryManagerMethods[] = +{ + { STRCAST("add"), reinterpret_cast<PyCFunction>(valueFactoryManagerAdd), METH_VARARGS, + PyDoc_STR(STRCAST("add(factory, id) -> None")) }, + { STRCAST("find"), reinterpret_cast<PyCFunction>(valueFactoryManagerFind), METH_VARARGS, + PyDoc_STR(STRCAST("find(id) -> function")) }, + { 0, 0 } /* sentinel */ +}; + +namespace IcePy +{ + +PyTypeObject ValueFactoryManagerType = +{ + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyVarObject_HEAD_INIT(0, 0) + STRCAST("IcePy.ValueFactoryManager"), /* tp_name */ + sizeof(ValueFactoryManagerObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + reinterpret_cast<destructor>(valueFactoryManagerDealloc), /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_reserved */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + 0, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + ValueFactoryManagerMethods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + reinterpret_cast<newfunc>(valueFactoryManagerNew), /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ +}; + +} + +bool +IcePy::initValueFactoryManager(PyObject* module) +{ + if(PyType_Ready(&ValueFactoryManagerType) < 0) + { + return false; + } + PyTypeObject* type = &ValueFactoryManagerType; // Necessary to prevent GCC's strict-alias warnings. + if(PyModule_AddObject(module, STRCAST("ValueFactoryManager"), reinterpret_cast<PyObject*>(type)) < 0) + { + return false; + } + + return true; +} diff --git a/python/modules/IcePy/ValueFactoryManager.h b/python/modules/IcePy/ValueFactoryManager.h new file mode 100644 index 00000000000..d9948e45e1e --- /dev/null +++ b/python/modules/IcePy/ValueFactoryManager.h @@ -0,0 +1,95 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2016 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 ICEPY_VALUE_FACTORY_MANAGER_H +#define ICEPY_VALUE_FACTORY_MANAGER_H + +#include <Config.h> +#include <Ice/ValueFactory.h> +#include <IceUtil/Mutex.h> + +namespace IcePy +{ + +extern PyTypeObject ValueFactoryManagerType; + +bool initValueFactoryManager(PyObject*); + +class FactoryWrapper : public Ice::ValueFactory +{ +public: + + FactoryWrapper(PyObject*, PyObject*); + ~FactoryWrapper(); + + virtual Ice::ValuePtr create(const std::string&); + + PyObject* getValueFactory() const; + PyObject* getObjectFactory() const; + + void destroy(); + +protected: + + PyObject* _valueFactory; + PyObject* _objectFactory; +}; +typedef IceUtil::Handle<FactoryWrapper> FactoryWrapperPtr; + +class DefaultValueFactory : public Ice::ValueFactory +{ +public: + + virtual Ice::ValuePtr create(const std::string&); + + void setDelegate(const Ice::ValueFactoryPtr&); + Ice::ValueFactoryPtr getDelegate() const { return _delegate; } + + PyObject* getValueFactory() const; + PyObject* getObjectFactory() const; + + void destroy(); + +private: + + Ice::ValueFactoryPtr _delegate; +}; +typedef IceUtil::Handle<DefaultValueFactory> DefaultValueFactoryPtr; + +class ValueFactoryManager : public Ice::ValueFactoryManager, public IceUtil::Mutex +{ +public: + + ValueFactoryManager(); + ~ValueFactoryManager(); + + virtual void add(const Ice::ValueFactoryPtr&, const std::string&); + virtual Ice::ValueFactoryPtr find(const std::string&) const; + + virtual void add(PyObject*, PyObject*, const std::string&); + PyObject* findValueFactory(const std::string&) const; + PyObject* findObjectFactory(const std::string&) const; + + PyObject* getObject() const; + + void destroy(); + +private: + + typedef std::map<std::string, Ice::ValueFactoryPtr> FactoryMap; + + PyObject* _self; + FactoryMap _factories; + DefaultValueFactoryPtr _defaultFactory; +}; +typedef IceUtil::Handle<ValueFactoryManager> ValueFactoryManagerPtr; + +} + +#endif diff --git a/python/modules/IcePy/msbuild/icepy.vcxproj b/python/modules/IcePy/msbuild/icepy.vcxproj new file mode 100644 index 00000000000..b98115eae1d --- /dev/null +++ b/python/modules/IcePy/msbuild/icepy.vcxproj @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Checksum.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\FileTracker.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Grammar.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\MD5.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\MD5I.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Parser.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Preprocessor.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Python.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\PythonUtil.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Scanner.cpp" /> + <ClCompile Include="..\..\..\..\cpp\src\Slice\SliceUtil.cpp" /> + <ClCompile Include="..\BatchRequestInterceptor.cpp" /> + <ClCompile Include="..\Communicator.cpp" /> + <ClCompile Include="..\Connection.cpp" /> + <ClCompile Include="..\ConnectionInfo.cpp" /> + <ClCompile Include="..\Current.cpp" /> + <ClCompile Include="..\Endpoint.cpp" /> + <ClCompile Include="..\EndpointInfo.cpp" /> + <ClCompile Include="..\ImplicitContext.cpp" /> + <ClCompile Include="..\Init.cpp" /> + <ClCompile Include="..\Logger.cpp" /> + <ClCompile Include="..\ObjectAdapter.cpp" /> + <ClCompile Include="..\Operation.cpp" /> + <ClCompile Include="..\Properties.cpp" /> + <ClCompile Include="..\PropertiesAdmin.cpp" /> + <ClCompile Include="..\Proxy.cpp" /> + <ClCompile Include="..\Slice.cpp" /> + <ClCompile Include="..\Thread.cpp" /> + <ClCompile Include="..\Types.cpp" /> + <ClCompile Include="..\Util.cpp" /> + <ClCompile Include="..\ValueFactoryManager.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\BatchRequestInterceptor.h" /> + <ClInclude Include="..\Communicator.h" /> + <ClInclude Include="..\Config.h" /> + <ClInclude Include="..\Connection.h" /> + <ClInclude Include="..\ConnectionInfo.h" /> + <ClInclude Include="..\Current.h" /> + <ClInclude Include="..\Endpoint.h" /> + <ClInclude Include="..\EndpointInfo.h" /> + <ClInclude Include="..\ImplicitContext.h" /> + <ClInclude Include="..\Logger.h" /> + <ClInclude Include="..\ObjectAdapter.h" /> + <ClInclude Include="..\Operation.h" /> + <ClInclude Include="..\Properties.h" /> + <ClInclude Include="..\PropertiesAdmin.h" /> + <ClInclude Include="..\Proxy.h" /> + <ClInclude Include="..\Slice.h" /> + <ClInclude Include="..\Thread.h" /> + <ClInclude Include="..\Types.h" /> + <ClInclude Include="..\Util.h" /> + <ClInclude Include="..\ValueFactoryManager.h" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\IcePy.rc" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{18BF13D3-85D3-43A5-8C96-E52EB0672F72}</ProjectGuid> + <RootNamespace>IceGrid</RootNamespace> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\msbuild\ice.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\msbuild\ice.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\msbuild\ice.props" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\..\msbuild\ice.props" /> + </ImportGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <TargetName>IcePy_d</TargetName> + <OutDir>..\..\..\python\$(Platform)\$(Configuration)\</OutDir> + <TargetExt>.pyd</TargetExt> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <TargetName>IcePy_d</TargetName> + <OutDir>..\..\..\python\$(Platform)\$(Configuration)\</OutDir> + <TargetExt>.pyd</TargetExt> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <TargetName>IcePy</TargetName> + <OutDir>..\..\..\python\$(Platform)\$(Configuration)\</OutDir> + <TargetExt>.pyd</TargetExt> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <TargetName>IcePy</TargetName> + <OutDir>..\..\..\python\$(Platform)\$(Configuration)\</OutDir> + <TargetExt>.pyd</TargetExt> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <DisableSpecificWarnings>4302;4311;4312;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <DisableSpecificWarnings>4302;4311;4312;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + </ItemDefinitionGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + <Import Project="..\..\..\msbuild\packages\mcpp.v140.2.7.2.9\build\native\mcpp.v140.targets" Condition="Exists('..\..\..\msbuild\packages\mcpp.v140.2.7.2.9\build\native\mcpp.v140.targets')" /> + </ImportGroup> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\..\msbuild\packages\mcpp.v140.2.7.2.9\build\native\mcpp.v140.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\msbuild\packages\mcpp.v140.2.7.2.9\build\native\mcpp.v140.targets'))" /> + </Target> +</Project>
\ No newline at end of file diff --git a/python/modules/IcePy/msbuild/icepy.vcxproj.filters b/python/modules/IcePy/msbuild/icepy.vcxproj.filters new file mode 100644 index 00000000000..19cd2b8c1f3 --- /dev/null +++ b/python/modules/IcePy/msbuild/icepy.vcxproj.filters @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{2a1af2ab-9818-4227-b57f-db37b32a9941}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{3e5dc6c2-9411-433a-ba20-c111abd667fc}</UniqueIdentifier> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{31c6127f-d193-46d6-9917-45e2099d36ca}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\BatchRequestInterceptor.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Communicator.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Connection.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\ConnectionInfo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Current.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Endpoint.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\EndpointInfo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\ImplicitContext.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Init.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Logger.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\ObjectAdapter.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Operation.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Properties.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\PropertiesAdmin.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Proxy.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Slice.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Thread.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Types.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Util.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\ValueFactoryManager.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\FileTracker.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Grammar.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\MD5.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Parser.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Preprocessor.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Python.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\PythonUtil.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Scanner.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\SliceUtil.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\MD5I.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\..\..\cpp\src\Slice\Checksum.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\BatchRequestInterceptor.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Communicator.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Config.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Connection.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\ConnectionInfo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Current.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Endpoint.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\EndpointInfo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\ImplicitContext.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Logger.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\ObjectAdapter.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Operation.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Properties.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Proxy.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Slice.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Thread.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Types.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Util.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\ValueFactoryManager.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\PropertiesAdmin.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="..\IcePy.rc"> + <Filter>Resource Files</Filter> + </ResourceCompile> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/python/modules/IcePy/msbuild/packages.config b/python/modules/IcePy/msbuild/packages.config new file mode 100644 index 00000000000..4b9db53e422 --- /dev/null +++ b/python/modules/IcePy/msbuild/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="mcpp.v140" version="2.7.2.9" targetFramework="native" /> +</packages>
\ No newline at end of file diff --git a/python/modules/Makefile b/python/modules/Makefile deleted file mode 100644 index bafd6fcbd5a..00000000000 --- a/python/modules/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = .. - -include $(top_srcdir)/config/Make.rules - -SUBDIRS = IcePy - -$(EVERYTHING):: - @for subdir in $(SUBDIRS); \ - do \ - echo "making $@ in $$subdir"; \ - ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ - done diff --git a/python/modules/Makefile.mak b/python/modules/Makefile.mak deleted file mode 100644 index 615fa625f12..00000000000 --- a/python/modules/Makefile.mak +++ /dev/null @@ -1,19 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = .. - -!include $(top_srcdir)\config\Make.rules.mak - -SUBDIRS = IcePy - -$(EVERYTHING):: - @for %i in ( $(SUBDIRS) ) do \ - @echo "making $@ in %i" && \ - cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1 diff --git a/python/msbuild/ice.proj b/python/msbuild/ice.proj new file mode 100644 index 00000000000..b1a99f7dcd1 --- /dev/null +++ b/python/msbuild/ice.proj @@ -0,0 +1,62 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <Import Project="$(MSBuildThisFileDirectory)\..\..\config\Ice.common.targets" /> + + <PropertyGroup Condition="'$(Configuration)' == ''"> + <Configuration>Release</Configuration> + </PropertyGroup> + + <PropertyGroup Condition="'$(Platform)' == ''"> + <Platform>Win32</Platform> + </PropertyGroup> + + <!-- Restore Nuget packages --> + <Target Name="NugetRestore" DependsOnTargets="GetNuget"> + <Exec Command="$(NugetExe) restore $(MSBuildThisFileDirectory)ice.sln"/> + </Target> + + <Choose> + <!-- + If BuildAllConfigurations is set to yes we build all configurations that are + part of the binary distribution, otherwise we just build the specific platform + and configuration. + --> + <When Condition="'$(BuildAllConfigurations)' == 'yes'"> + <ItemGroup> + <DistProjects Include="ice.sln"> + <Properties>Configuration=Release;Platform=Win32</Properties> + </DistProjects> + <DistProjects Include="ice.sln"> + <Properties>Configuration=Release;Platform=x64</Properties> + </DistProjects> + <DistProjects Include="..\python\**\msbuild\*.proj"> + <Properties>Configuration=Release;Platform=Win32</Properties> + </DistProjects> + </ItemGroup> + </When> + <Otherwise> + <ItemGroup> + <DistProjects Include="ice.sln"> + <Properties>Configuration=$(Configuration);Platform=$(Platform)</Properties> + </DistProjects> + + <DistProjects Include="..\python\**\msbuild\*.proj"> + <Properties>Configuration=$(Configuration);Platform=$(Platform)</Properties> + </DistProjects> + </ItemGroup> + </Otherwise> + </Choose> + + <Target Name="Build" DependsOnTargets="NugetRestore"> + <MSBuild Projects="@(DistProjects)" + BuildInParallel="false" + Properties="%(Properties)" /> + </Target> + + <Target Name="Clean"> + <MSBuild Projects="@(DistProjects)" + BuildInParallel="true" + Properties="%(Properties)" + Targets="Clean" /> + </Target> +</Project> diff --git a/python/msbuild/ice.props b/python/msbuild/ice.props new file mode 100644 index 00000000000..e9deb1750d2 --- /dev/null +++ b/python/msbuild/ice.props @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="..\..\cpp\msbuild\Ice.Cpp98.props" /> + <PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='Win32'"> + <PythonHome>C:\Python35</PythonHome> + </PropertyGroup> + <PropertyGroup Label="UserMacros" Condition="'$(Platform)'=='x64'"> + <PythonHome>C:\Python35-amd64</PythonHome> + </PropertyGroup> + <PropertyGroup> + <IceBuilderPythonProps Condition="!Exists('$(IceBuilderPythonProps)')">$([System.IO.Directory]::GetFiles('$(LocalAppData)\Microsoft\VisualStudio\$(VisualStudioVersion)\Extensions', 'IceBuilder.Python.props', SearchOption.AllDirectories))</IceBuilderPythonProps> + <IceBuilderPythonTargets Condition="!Exists('$(IceBuilderPythonTargets)')">$([System.IO.Directory]::GetFiles('$(LocalAppData)\Microsoft\VisualStudio\$(VisualStudioVersion)\Extensions', 'IceBuilder.Python.targets', SearchOption.AllDirectories))</IceBuilderPythonTargets> + </PropertyGroup> + <ItemGroup> + <BuildMacro Include="PythonHome"> + <Value>$(PythonHome)</Value> + </BuildMacro> + </ItemGroup> + <ItemDefinitionGroup> + <ClCompile> + <AdditionalIncludeDirectories>..;$(PythonHome)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalLibraryDirectories>$(PythonHome)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + </Link> + </ItemDefinitionGroup> +</Project> diff --git a/python/msbuild/ice.sln b/python/msbuild/ice.sln new file mode 100644 index 00000000000..f44e96846b5 --- /dev/null +++ b/python/msbuild/ice.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icepy", "..\modules\IcePy\msbuild\icepy.vcxproj", "{18BF13D3-85D3-43A5-8C96-E52EB0672F72}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Debug|Win32.ActiveCfg = Debug|Win32 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Debug|Win32.Build.0 = Debug|Win32 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Debug|x64.ActiveCfg = Debug|x64 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Debug|x64.Build.0 = Debug|x64 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Release|Win32.ActiveCfg = Release|Win32 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Release|Win32.Build.0 = Release|Win32 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Release|x64.ActiveCfg = Release|x64 + {18BF13D3-85D3-43A5-8C96-E52EB0672F72}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/python/msbuild/ice.tests.props b/python/msbuild/ice.tests.props new file mode 100644 index 00000000000..770f390218f --- /dev/null +++ b/python/msbuild/ice.tests.props @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(UseBinDist)' != 'yes' and '$(ICE_HOME)' == ''"> + <IceHome>$(MSBuildThisFileDirectory)..\..</IceHome> + </PropertyGroup> + <PropertyGroup Label="IceBuilder"> + <IceBuilderOutputDir>..</IceBuilderOutputDir> + </PropertyGroup> + <PropertyGroup Condition="'$(PhpUseNamespaces)' == 'yes'"> + <IceBuilderNamespace>yes</IceBuilderNamespace> + </PropertyGroup> + <Target Name="Build"/> + <Target Name="Clean"/> +</Project> diff --git a/python/python/.depend.mak b/python/python/.depend.mak deleted file mode 100644 index e46e1645583..00000000000 --- a/python/python/.depend.mak +++ /dev/null @@ -1,331 +0,0 @@ - -Ice_BuiltinSequences_ice.py: \ - "$(slicedir)\Ice\BuiltinSequences.ice" - -Ice_Communicator_ice.py: \ - "$(slicedir)\Ice\Communicator.ice" \ - "$(slicedir)/Ice/LoggerF.ice" \ - "$(slicedir)/Ice/InstrumentationF.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/ObjectFactoryF.ice" \ - "$(slicedir)/Ice/RouterF.ice" \ - "$(slicedir)/Ice/LocatorF.ice" \ - "$(slicedir)/Ice/PluginF.ice" \ - "$(slicedir)/Ice/ImplicitContextF.ice" \ - "$(slicedir)/Ice/Current.ice" \ - "$(slicedir)/Ice/ConnectionF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/FacetMap.ice" - -Ice_CommunicatorF_ice.py: \ - "$(slicedir)\Ice\CommunicatorF.ice" - -Ice_Connection_ice.py: \ - "$(slicedir)\Ice\Connection.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Endpoint.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/EndpointF.ice" - -Ice_ConnectionF_ice.py: \ - "$(slicedir)\Ice\ConnectionF.ice" - -Ice_Current_ice.py: \ - "$(slicedir)\Ice\Current.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/ConnectionF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" - -Ice_Endpoint_ice.py: \ - "$(slicedir)\Ice\Endpoint.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/EndpointF.ice" - -Ice_EndpointF_ice.py: \ - "$(slicedir)\Ice\EndpointF.ice" - -Ice_EndpointTypes_ice.py: \ - "$(slicedir)\Ice\EndpointTypes.ice" - -Ice_FacetMap_ice.py: \ - "$(slicedir)\Ice\FacetMap.ice" - -Ice_Identity_ice.py: \ - "$(slicedir)\Ice\Identity.ice" - -Ice_ImplicitContext_ice.py: \ - "$(slicedir)\Ice\ImplicitContext.ice" \ - "$(slicedir)/Ice/LocalException.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Current.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/ConnectionF.ice" - -Ice_ImplicitContextF_ice.py: \ - "$(slicedir)\Ice\ImplicitContextF.ice" - -Ice_Instrumentation_ice.py: \ - "$(slicedir)\Ice\Instrumentation.ice" \ - "$(slicedir)/Ice/EndpointF.ice" \ - "$(slicedir)/Ice/ConnectionF.ice" \ - "$(slicedir)/Ice/Current.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" - -Ice_InstrumentationF_ice.py: \ - "$(slicedir)\Ice\InstrumentationF.ice" - -Ice_LocalException_ice.py: \ - "$(slicedir)\Ice\LocalException.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_Locator_ice.py: \ - "$(slicedir)\Ice\Locator.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/ProcessF.ice" - -Ice_LocatorF_ice.py: \ - "$(slicedir)\Ice\LocatorF.ice" - -Ice_Logger_ice.py: \ - "$(slicedir)\Ice\Logger.ice" - -Ice_LoggerF_ice.py: \ - "$(slicedir)\Ice\LoggerF.ice" - -Ice_Metrics_ice.py: \ - "$(slicedir)\Ice\Metrics.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_ObjectAdapter_ice.py: \ - "$(slicedir)\Ice\ObjectAdapter.ice" \ - "$(slicedir)/Ice/CommunicatorF.ice" \ - "$(slicedir)/Ice/ServantLocatorF.ice" \ - "$(slicedir)/Ice/LocatorF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/FacetMap.ice" \ - "$(slicedir)/Ice/Endpoint.ice" \ - "$(slicedir)/Ice/Version.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/EndpointF.ice" - -Ice_ObjectAdapterF_ice.py: \ - "$(slicedir)\Ice\ObjectAdapterF.ice" - -Ice_ObjectFactory_ice.py: \ - "$(slicedir)\Ice\ObjectFactory.ice" - -Ice_ObjectFactoryF_ice.py: \ - "$(slicedir)\Ice\ObjectFactoryF.ice" - -Ice_Plugin_ice.py: \ - "$(slicedir)\Ice\Plugin.ice" \ - "$(slicedir)/Ice/LoggerF.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_PluginF_ice.py: \ - "$(slicedir)\Ice\PluginF.ice" - -Ice_Process_ice.py: \ - "$(slicedir)\Ice\Process.ice" - -Ice_ProcessF_ice.py: \ - "$(slicedir)\Ice\ProcessF.ice" - -Ice_Properties_ice.py: \ - "$(slicedir)\Ice\Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_PropertiesAdmin_ice.py: \ - "$(slicedir)\Ice\PropertiesAdmin.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_PropertiesF_ice.py: \ - "$(slicedir)\Ice\PropertiesF.ice" - -Ice_Router_ice.py: \ - "$(slicedir)\Ice\Router.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_RouterF_ice.py: \ - "$(slicedir)\Ice\RouterF.ice" - -Ice_ServantLocator_ice.py: \ - "$(slicedir)\Ice\ServantLocator.ice" \ - "$(slicedir)/Ice/ObjectAdapterF.ice" \ - "$(slicedir)/Ice/Current.ice" \ - "$(slicedir)/Ice/ConnectionF.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/Version.ice" - -Ice_ServantLocatorF_ice.py: \ - "$(slicedir)\Ice\ServantLocatorF.ice" - -Ice_SliceChecksumDict_ice.py: \ - "$(slicedir)\Ice\SliceChecksumDict.ice" - -Ice_Version_ice.py: \ - "$(slicedir)\Ice\Version.ice" - -Glacier2_Metrics_ice.py: \ - "$(slicedir)\Glacier2\Metrics.ice" \ - "$(slicedir)/Ice/Metrics.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Glacier2_PermissionsVerifier_ice.py: \ - "$(slicedir)\Glacier2\PermissionsVerifier.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -Glacier2_PermissionsVerifierF_ice.py: \ - "$(slicedir)\Glacier2\PermissionsVerifierF.ice" - -Glacier2_Router_ice.py: \ - "$(slicedir)\Glacier2\Router.ice" \ - "$(slicedir)/Ice/Router.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/Glacier2/PermissionsVerifier.ice" - -Glacier2_RouterF_ice.py: \ - "$(slicedir)\Glacier2\RouterF.ice" - -Glacier2_Session_ice.py: \ - "$(slicedir)\Glacier2\Session.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" - -Glacier2_SSLInfo_ice.py: \ - "$(slicedir)\Glacier2\SSLInfo.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IceBox_IceBox_ice.py: \ - "$(slicedir)\IceBox\IceBox.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/CommunicatorF.ice" \ - "$(slicedir)/Ice/PropertiesF.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" - -IceGrid_Admin_ice.py: \ - "$(slicedir)\IceGrid\Admin.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/IceGrid/Exception.ice" \ - "$(slicedir)/IceGrid/Descriptor.ice" - -IceGrid_Descriptor_ice.py: \ - "$(slicedir)\IceGrid\Descriptor.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IceGrid_Exception_ice.py: \ - "$(slicedir)\IceGrid\Exception.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IceGrid_FileParser_ice.py: \ - "$(slicedir)\IceGrid\FileParser.ice" \ - "$(slicedir)/IceGrid/Admin.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/IceGrid/Exception.ice" \ - "$(slicedir)/IceGrid/Descriptor.ice" - -IceGrid_Locator_ice.py: \ - "$(slicedir)\IceGrid\Locator.ice" \ - "$(slicedir)/Ice/Locator.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/ProcessF.ice" - -IceGrid_Observer_ice.py: \ - "$(slicedir)\IceGrid\Observer.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/IceGrid/Exception.ice" \ - "$(slicedir)/IceGrid/Descriptor.ice" \ - "$(slicedir)/IceGrid/Admin.ice" \ - "$(slicedir)/Ice/Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" - -IceGrid_Query_ice.py: \ - "$(slicedir)\IceGrid\Query.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/IceGrid/Exception.ice" - -IceGrid_Registry_ice.py: \ - "$(slicedir)\IceGrid\Registry.ice" \ - "$(slicedir)/IceGrid/Exception.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/IceGrid/Session.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/IceGrid/Admin.ice" \ - "$(slicedir)/Ice/Properties.ice" \ - "$(slicedir)/Ice/PropertiesAdmin.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" \ - "$(slicedir)/IceGrid/Descriptor.ice" - -IceGrid_Session_ice.py: \ - "$(slicedir)\IceGrid\Session.ice" \ - "$(slicedir)/Glacier2/Session.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Glacier2/SSLInfo.ice" \ - "$(slicedir)/IceGrid/Exception.ice" - -IceGrid_UserAccountMapper_ice.py: \ - "$(slicedir)\IceGrid\UserAccountMapper.ice" - -IcePatch2_FileInfo_ice.py: \ - "$(slicedir)\IcePatch2\FileInfo.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IcePatch2_FileServer_ice.py: \ - "$(slicedir)\IcePatch2\FileServer.ice" \ - "$(slicedir)/IcePatch2/FileInfo.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IceStorm_Metrics_ice.py: \ - "$(slicedir)\IceStorm\Metrics.ice" \ - "$(slicedir)/Ice/Metrics.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" - -IceStorm_IceStorm_ice.py: \ - "$(slicedir)\IceStorm\IceStorm.ice" \ - "$(slicedir)/Ice/Identity.ice" \ - "$(slicedir)/Ice/SliceChecksumDict.ice" \ - "$(slicedir)/IceStorm/Metrics.ice" \ - "$(slicedir)/Ice/Metrics.ice" \ - "$(slicedir)/Ice/BuiltinSequences.ice" diff --git a/python/python/64/.gitignore b/python/python/64/.gitignore deleted file mode 100644 index 39af5887579..00000000000 --- a/python/python/64/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file, so that git retains this otherwise empty directory. diff --git a/python/python/Glacier2.py b/python/python/Glacier2.py index 6ff65217d61..c5b4bad41e1 100644 --- a/python/python/Glacier2.py +++ b/python/python/Glacier2.py @@ -33,17 +33,6 @@ class RestartSessionException(Exception): def __init__(self): pass -class ConnectionCallbackI(Ice.ConnectionCallback): - def __init__(self, app): - self._app = app - - def heartbeat(self, conn): - pass - - def closed(self, conn): - self._app.sessionDestroyed() - - class Application(Ice.Application): def __init__(self, signalPolicy=0): # HandleSignals=0 @@ -150,7 +139,7 @@ Application.NoSignalHandling. connection = Application._router.ice_getCachedConnection() assert(connection) connection.setACM(acmTimeout, Ice.Unset, Ice.ACMHeartbeat.HeartbeatAlways) - connection.setCallback(ConnectionCallbackI(self)) + connection.setCloseCallback(lambda conn: self.sessionDestroyed()) Application._category = Application._router.getCategoryForClient() status = self.runWithSession(args) diff --git a/python/python/Glacier2/msbuild/glacier2.proj b/python/python/Glacier2/msbuild/glacier2.proj new file mode 100644 index 00000000000..e6eff151b49 --- /dev/null +++ b/python/python/Glacier2/msbuild/glacier2.proj @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>Glacier2_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderNoPackage>yes</IceBuilderNoPackage> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" Condition="Exists('$(IceBuilderPythonProps)')"/> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\Glacier2\PermissionsVerifier.ice" /> + <IceBuilder Include="..\..\..\..\slice\Glacier2\PermissionsVerifierF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Glacier2\Router.ice" /> + <IceBuilder Include="..\..\..\..\slice\Glacier2\RouterF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Glacier2\Session.ice" /> + <IceBuilder Include="..\..\..\..\slice\Glacier2\SSLInfo.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" Condition="Exists('$(IceBuilderPythonTargets)')"/> +</Project> diff --git a/python/python/Ice.py b/python/python/Ice.py index 9278296334a..c28541902ec 100644 --- a/python/python/Ice.py +++ b/python/python/Ice.py @@ -178,7 +178,11 @@ class Exception(Exception): # Derives from built-in base 'Exception' class. def ice_name(self): '''Returns the type name of this exception.''' - return self._ice_name + return self.ice_id()[2:] + + def ice_id(self): + '''Returns the type id of this exception.''' + return self._ice_id class LocalException(Exception): '''The base class for all Ice run-time exceptions.''' @@ -446,6 +450,7 @@ import Ice_Locator_ice import Ice_Logger_ice import Ice_ObjectAdapter_ice import Ice_ObjectFactory_ice +import Ice_ValueFactory_ice import Ice_Process_ice import Ice_Properties_ice import Ice_RemoteLogger_ice @@ -473,7 +478,6 @@ del OpaqueEndpointInfo OpaqueEndpointInfo = IcePy.OpaqueEndpointInfo SSLEndpointInfo = IcePy.SSLEndpointInfo -WSSEndpointInfo = IcePy.WSSEndpointInfo # # Replace ConnectionInfo with our implementation. @@ -490,7 +494,6 @@ del WSConnectionInfo WSConnectionInfo = IcePy.WSConnectionInfo SSLConnectionInfo = IcePy.SSLConnectionInfo -WSSConnectionInfo = IcePy.WSSConnectionInfo class ThreadNotification(object): '''Base class for thread notification callbacks. A subclass must @@ -560,6 +563,7 @@ threadHook: An object that implements ThreadNotification. self.logger = None self.threadHook = None self.batchRequestInterceptor = None + self.valueFactoryManager = None # # Communicator wrapper. @@ -618,11 +622,15 @@ class CommunicatorI(Communicator): return ObjectAdapterI(adapter) def addObjectFactory(self, factory, id): - self._impl.addObjectFactory(factory, id) + # The extension implementation requires an extra argument that is a value factory + self._impl.addObjectFactory(factory, id, lambda s, factory=factory: factory.create(s)) def findObjectFactory(self, id): return self._impl.findObjectFactory(id) + def getValueFactoryManager(self): + return self._impl.getValueFactoryManager() + def getImplicitContext(self): context = self._impl.getImplicitContext() if context == None: diff --git a/python/python/Ice/msbuild/ice.proj b/python/python/Ice/msbuild/ice.proj new file mode 100644 index 00000000000..282bf52a515 --- /dev/null +++ b/python/python/Ice/msbuild/ice.proj @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>Ice_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderNoPackage>yes</IceBuilderNoPackage> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" Condition="Exists('$(IceBuilderPythonProps)')"/> + + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\Ice\BuiltinSequences.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Communicator.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\CommunicatorF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Connection.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ConnectionF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Current.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Endpoint.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\EndpointF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\EndpointTypes.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\FacetMap.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Identity.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ImplicitContext.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ImplicitContextF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Instrumentation.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\InstrumentationF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\LocalException.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Locator.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\LocatorF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Logger.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\LoggerF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ObjectAdapter.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ObjectAdapterF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ObjectFactory.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Plugin.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\PluginF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Process.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ProcessF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Properties.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\PropertiesAdmin.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\PropertiesF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\RemoteLogger.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Router.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\RouterF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ServantLocator.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ServantLocatorF.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\SliceChecksumDict.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\ValueFactory.ice" /> + <IceBuilder Include="..\..\..\..\slice\Ice\Version.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" Condition="Exists('$(IceBuilderPythonTargets)')"/> +</Project> diff --git a/python/python/IceBox/msbuild/icebox.proj b/python/python/IceBox/msbuild/icebox.proj new file mode 100644 index 00000000000..83c41eebf1e --- /dev/null +++ b/python/python/IceBox/msbuild/icebox.proj @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>IceBox_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" Condition="Exists('$(IceBuilderPythonProps)')"/> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\IceBox\IceBox.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" Condition="Exists('$(IceBuilderPythonTargets)')"/> +</Project> diff --git a/python/python/IceGrid/msbuild/icegrid.proj b/python/python/IceGrid/msbuild/icegrid.proj new file mode 100644 index 00000000000..c97521a17cf --- /dev/null +++ b/python/python/IceGrid/msbuild/icegrid.proj @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>IceGrid_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\IceGrid\Admin.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\Descriptor.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\Exception.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\FileParser.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\Registry.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\Session.ice" /> + <IceBuilder Include="..\..\..\..\slice\IceGrid\UserAccountMapper.ice" /> + </ItemGroup> + + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/IceMX/msbuild/glacier2.proj b/python/python/IceMX/msbuild/glacier2.proj new file mode 100644 index 00000000000..b8d9ece2b4f --- /dev/null +++ b/python/python/IceMX/msbuild/glacier2.proj @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>Glacier2_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\glacier2\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\glacier2\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\Glacier2\Metrics.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/IceMX/msbuild/ice.proj b/python/python/IceMX/msbuild/ice.proj new file mode 100644 index 00000000000..61d1d021d18 --- /dev/null +++ b/python/python/IceMX/msbuild/ice.proj @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>Ice_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\ice\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\ice\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\Ice\Metrics.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/IceMX/msbuild/icestorm.proj b/python/python/IceMX/msbuild/icestorm.proj new file mode 100644 index 00000000000..4dc8eb0d5d3 --- /dev/null +++ b/python/python/IceMX/msbuild/icestorm.proj @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="Globals"> + <IceBuilderPythonProps Condition="!Exists('$(IceBuilderPythonProps)')">$([System.IO.Directory]::GetFiles('$(LocalAppData)\Microsoft\VisualStudio\$(VisualStudioVersion)\Extensions', 'IceBuilder.Python.props', SearchOption.AllDirectories))</IceBuilderPythonProps> + <IceBuilderPythonTargets Condition="!Exists('$(IceBuilderPythonTargets)')">$([System.IO.Directory]::GetFiles('$(LocalAppData)\Microsoft\VisualStudio\$(VisualStudioVersion)\Extensions', 'IceBuilder.Python.targets', SearchOption.AllDirectories))</IceBuilderPythonTargets> + <IntDir>$(MSbuildThisFileDirectory)$(Configuration)\$(Platform)\icestorm</IntDir> + <IceBuilderDependFile>$(IntDir)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(IntDir)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\IceStorm\Metrics.ice" /> + </ItemGroup> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>IceStorm_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\icestorm\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\icestorm\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/IcePatch2/msbuild/icepatch2.proj b/python/python/IcePatch2/msbuild/icepatch2.proj new file mode 100644 index 00000000000..038105f4df1 --- /dev/null +++ b/python/python/IcePatch2/msbuild/icepatch2.proj @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>IcePatch2_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\IcePatch2\FileServer.ice" /> + <IceBuilder Include="..\..\..\..\slice\IcePatch2\FileInfo.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/IceStorm/msbuild/icestorm.proj b/python/python/IceStorm/msbuild/icestorm.proj new file mode 100644 index 00000000000..9d46163bc28 --- /dev/null +++ b/python/python/IceStorm/msbuild/icestorm.proj @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Label="IceBuilder"> + <IceBuilderAllowIcePrefix>true</IceBuilderAllowIcePrefix> + <IceBuilderPrefix>IceStorm_</IceBuilderPrefix> + <IceBuilderOutputDir>..\..</IceBuilderOutputDir> + <IceBuilderDependFile>$(MSBuildProjectDirectory)\IceBuilder.d</IceBuilderDependFile> + <IceBuilderCommandLog>$(MSBuildProjectDirectory)\IceBuilder.command.log</IceBuilderCommandLog> + </PropertyGroup> + <Import Project="..\..\..\msbuild\ice.props" /> + <Import Project="$(IceBuilderPythonProps)" /> + <ItemGroup> + <IceBuilder Include="..\..\..\..\slice\IceStorm\IceStorm.ice" /> + </ItemGroup> + <Target Name="Build"/> + <Target Name="Clean"/> + <Import Project="$(IceBuilderPythonTargets)" /> +</Project> diff --git a/python/python/Makefile b/python/python/Makefile index 63d394c4937..4c14002bfe6 100644 --- a/python/python/Makefile +++ b/python/python/Makefile @@ -7,150 +7,32 @@ # # ********************************************************************** -top_srcdir = .. +top_srcdir := ../.. +lang_srcdir := $(top_srcdir)/python include $(top_srcdir)/config/Make.rules +include $(lang_srcdir)/config/Make.rules # -# Parallel builds are not supported because multiple executions of slice2py could -# attempt to modify the __init__.py file simultaneously. +# Load C++ dependencies # -.NOTPARALLEL: - -ICE_SRCS = Ice_BuiltinSequences_ice.py \ - Ice_Communicator_ice.py \ - Ice_CommunicatorF_ice.py \ - Ice_Connection_ice.py \ - Ice_ConnectionF_ice.py \ - Ice_Current_ice.py \ - Ice_Endpoint_ice.py \ - Ice_EndpointF_ice.py \ - Ice_EndpointTypes_ice.py \ - Ice_FacetMap_ice.py \ - Ice_Identity_ice.py \ - Ice_ImplicitContext_ice.py \ - Ice_ImplicitContextF_ice.py \ - Ice_Instrumentation_ice.py \ - Ice_InstrumentationF_ice.py \ - Ice_LocalException_ice.py \ - Ice_Locator_ice.py \ - Ice_LocatorF_ice.py \ - Ice_Logger_ice.py \ - Ice_LoggerF_ice.py \ - Ice_Metrics_ice.py \ - Ice_ObjectAdapter_ice.py \ - Ice_ObjectAdapterF_ice.py \ - Ice_ObjectFactory_ice.py \ - Ice_ObjectFactoryF_ice.py \ - Ice_Plugin_ice.py \ - Ice_PluginF_ice.py \ - Ice_Process_ice.py \ - Ice_ProcessF_ice.py \ - Ice_Properties_ice.py \ - Ice_PropertiesAdmin_ice.py \ - Ice_PropertiesF_ice.py \ - Ice_RemoteLogger_ice.py \ - Ice_Router_ice.py \ - Ice_RouterF_ice.py \ - Ice_ServantLocator_ice.py \ - Ice_ServantLocatorF_ice.py \ - Ice_SliceChecksumDict_ice.py \ - Ice_Version_ice.py - -GLACIER2_SRCS = Glacier2_Metrics_ice.py \ - Glacier2_PermissionsVerifier_ice.py \ - Glacier2_PermissionsVerifierF_ice.py \ - Glacier2_Router_ice.py \ - Glacier2_RouterF_ice.py \ - Glacier2_Session_ice.py \ - Glacier2_SSLInfo_ice.py - -ICEBOX_SRCS = IceBox_IceBox_ice.py - -ICEGRID_SRCS = IceGrid_Admin_ice.py \ - IceGrid_Descriptor_ice.py \ - IceGrid_Exception_ice.py \ - IceGrid_FileParser_ice.py \ - IceGrid_Locator_ice.py \ - IceGrid_Observer_ice.py \ - IceGrid_Query_ice.py \ - IceGrid_Registry_ice.py \ - IceGrid_Session_ice.py \ - IceGrid_UserAccountMapper_ice.py - -ICEPATCH2_SRCS = IcePatch2_FileInfo_ice.py \ - IcePatch2_FileServer_ice.py - -ICESTORM_SRCS = IceStorm_IceStorm_ice.py \ - IceStorm_Metrics_ice.py - -ALL_SRCS = $(ICE_SRCS) \ - $(GLACIER2_SRCS) \ - $(ICEBOX_SRCS) \ - $(ICEGRID_SRCS) \ - $(ICEPATCH2_SRCS) \ - $(ICESTORM_SRCS) - -ICE_SLICE = $(patsubst Ice_%_ice.py,$(slicedir)/Ice/%.ice,$(ICE_SRCS)) -GLACIER2_SLICE = $(patsubst Glacier2_%_ice.py,$(slicedir)/Glacier2/%.ice,$(GLACIER2_SRCS)) -ICEBOX_SLICE = $(patsubst IceBox_%_ice.py,$(slicedir)/IceBox/%.ice,$(ICEBOX_SRCS)) -ICEGRID_SLICE = $(patsubst IceGrid_%_ice.py,$(slicedir)/IceGrid/%.ice,$(ICEGRID_SRCS)) -ICEPATCH2_SLICE = $(patsubst IcePatch2_%_ice.py,$(slicedir)/IcePatch2/%.ice,$(ICEPATCH2_SRCS)) -ICESTORM_SLICE = $(patsubst IceStorm_%_ice.py,$(slicedir)/IceStorm/%.ice,$(ICESTORM_SRCS)) +$(eval $(call load-translator-dependencies,$(top_srcdir)/cpp/src/slice2py)) -PACKAGES = IceBox IceGrid IcePatch2 IceStorm IceMX - -all:: $(ALL_SRCS) - -SLICE2PYFLAGS += --ice - -Ice_%_ice.py: $(slicedir)/Ice/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix Ice_ --no-package $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix Ice_ --no-package $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d - -Ice_Metrics_ice.py: $(slicedir)/Ice/Metrics.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix Ice_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix Ice_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d - -Glacier2_%_ice.py: $(slicedir)/Glacier2/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix Glacier2_ --no-package --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix Glacier2_ --no-package --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d - -Glacier2_Metrics_ice.py: $(slicedir)/Glacier2/Metrics.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix Glacier2_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix Glacier2_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d - -IceBox_%_ice.py: $(slicedir)/IceBox/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix IceBox_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix IceBox_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d - -IceGrid_%_ice.py: $(slicedir)/IceGrid/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix IceGrid_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix IceGrid_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d +.NOTPARALLEL: -IcePatch2_%_ice.py: $(slicedir)/IcePatch2/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix IcePatch2_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix IcePatch2_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d +install:: | $(DESTDIR)$(install_pythondir) + $(E) "Installing generated code" + $(Q)$(INSTALL) *.py $(DESTDIR)$(install_pythondir) -IceStorm_%_ice.py: $(slicedir)/IceStorm/%.ice $(SLICEPARSERLIB) - $(SLICE2PY) --prefix IceStorm_ --checksum $(SLICE2PYFLAGS) $< - @mkdir -p .depend - @$(SLICE2PY) --prefix IceStorm_ --checksum $(SLICE2PYFLAGS) --depend $< > .depend/$(*F).ice.d +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,Ice,--no-package)) +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,Glacier2,--no-package)) +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IceBox)) +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IceGrid)) +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IcePatch2)) +$(eval $(call make-python-package,$(slicedir),$(lang_srcdir)/python,IceStorm)) -install:: $(ALL_SRCS) - @echo "Installing generated code" - $(INSTALL_DATA) *.py $(DESTDIR)$(install_pythondir) - @for i in $(PACKAGES) ; \ - do \ - $(INSTALL_DATA) -r $$i $(DESTDIR)$(install_pythondir) ; \ - done +# Generate this two files individually without the --no-package option to ensure the +# IceMX package is updated. +$(eval $(call make-python-slice,$(slicedir),$(lang_srcdir)/python,Ice,Metrics)) +$(eval $(call make-python-slice,$(slicedir),$(lang_srcdir)/python,Glacier2,Metrics)) -clean:: - rm -rf $(PACKAGES) *_ice.py diff --git a/python/python/Makefile.mak b/python/python/Makefile.mak deleted file mode 100644 index 97032660e72..00000000000 --- a/python/python/Makefile.mak +++ /dev/null @@ -1,361 +0,0 @@ -# ********************************************************************** -# -# Copyright (c) 2003-2016 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. -# -# ********************************************************************** - -top_srcdir = .. - -!include $(top_srcdir)\config\Make.rules.mak - -ICE_SDIR = Ice - -ICE_SLICES = Ice\BuiltinSequences.ice \ - Ice\Communicator.ice \ - Ice\CommunicatorF.ice \ - Ice\Connection.ice \ - Ice\ConnectionF.ice \ - Ice\Current.ice \ - Ice\Endpoint.ice \ - Ice\EndpointF.ice \ - Ice\EndpointTypes.ice \ - Ice\FacetMap.ice \ - Ice\Identity.ice \ - Ice\ImplicitContext.ice \ - Ice\ImplicitContextF.ice \ - Ice\Instrumentation.ice \ - Ice\InstrumentationF.ice \ - Ice\LocalException.ice \ - Ice\Locator.ice \ - Ice\LocatorF.ice \ - Ice\Logger.ice \ - Ice\LoggerF.ice \ - Ice\Metrics.ice \ - Ice\ObjectAdapter.ice \ - Ice\ObjectAdapterF.ice \ - Ice\ObjectFactory.ice \ - Ice\ObjectFactoryF.ice \ - Ice\Plugin.ice \ - Ice\PluginF.ice \ - Ice\Process.ice \ - Ice\ProcessF.ice \ - Ice\Properties.ice \ - Ice\PropertiesAdmin.ice \ - Ice\PropertiesF.ice \ - Ice\RemoteLogger.ice \ - Ice\Router.ice \ - Ice\RouterF.ice \ - Ice\ServantLocator.ice \ - Ice\ServantLocatorF.ice \ - Ice\SliceChecksumDict.ice \ - Ice\Version.ice \ - -ICE_SRCS = $(ICE_SLICES:.ice=_ice.py) -ICE_SRCS = $(ICE_SRCS:Ice\=Ice_) - -GLACIER2_SDIR = Glacier2 - -GLACIER2_SLICES = Glacier2\Metrics.ice \ - Glacier2\PermissionsVerifier.ice \ - Glacier2\PermissionsVerifierF.ice \ - Glacier2\Router.ice \ - Glacier2\RouterF.ice \ - Glacier2\Session.ice \ - Glacier2\SSLInfo.ice \ - -GLACIER2_SRCS = $(GLACIER2_SLICES:.ice=_ice.py) -GLACIER2_SRCS = $(GLACIER2_SRCS:Glacier2\=Glacier2_) - -ICEBOX_SDIR = IceBox - -ICEBOX_SLICES = IceBox\IceBox.ice -ICEBOX_SRCS = $(ICEBOX_SLICES:.ice=_ice.py) -ICEBOX_SRCS = $(ICEBOX_SRCS:IceBox\=IceBox_) - -ICEGRID_SDIR = IceGrid - -ICEGRID_SLICES = IceGrid\Admin.ice \ - IceGrid\Descriptor.ice \ - IceGrid\Exception.ice \ - IceGrid\FileParser.ice \ - IceGrid\Locator.ice \ - IceGrid\Observer.ice \ - IceGrid\Query.ice \ - IceGrid\Registry.ice \ - IceGrid\Session.ice \ - IceGrid\UserAccountMapper.ice \ - -ICEGRID_SRCS = $(ICEGRID_SLICES:.ice=_ice.py) -ICEGRID_SRCS = $(ICEGRID_SRCS:IceGrid\=IceGrid_) - -ICEPATCH2_SDIR = IcePatch2 - -ICEPATCH2_SLICES = IcePatch2\FileInfo.ice \ - IcePatch2\FileServer.ice - -ICEPATCH2_SRCS = $(ICEPATCH2_SLICES:.ice=_ice.py) -ICEPATCH2_SRCS = $(ICEPATCH2_SRCS:IcePatch2\=IcePatch2_) - -ICESTORM_SDIR = IceStorm - -ICESTORM_SLICES = IceStorm\Metrics.ice \ - IceStorm\IceStorm.ice - -ICESTORM_SRCS = $(ICESTORM_SLICES:.ice=_ice.py) -ICESTORM_SRCS = $(ICESTORM_SRCS:IceStorm\=IceStorm_) - -DEPENDS = $(ICE_SLICES:.ice=.d) \ - $(GLACIER2_SLICES:.ice=.d) \ - $(ICEBOX_SLICES:.ice=.d) \ - $(ICEGRID_SLICES:.ice=.d) \ - $(ICEPATCH2_SLICES:.ice=.d) \ - $(ICESTORM_SLICES:.ice=.d) - -ALL_SRCS = $(ICE_SRCS) \ - $(GLACIER2_SRCS) \ - $(ICEBOX_SRCS) \ - $(ICEGRID_SRCS) \ - $(ICEPATCH2_SRCS) \ - $(ICESTORM_SRCS) - -PACKAGES = IceBox IceGrid IcePatch2 IceStorm IceMX - -SLICE2PYFLAGS = $(SLICE2PYFLAGS) --ice - -all:: $(ALL_SRCS) - -depend:: - del /q .depend.mak - -{$(slicedir)\$(ICE_SDIR)\}.ice{$(ICE_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix Ice_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -{$(slicedir)\$(GLACIER2_SDIR)\}.ice{$(GLACIER2_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix Glacier2_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -{$(slicedir)\$(ICEBOX_SDIR)\}.ice{$(ICEBOX_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix IceBox_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -{$(slicedir)\$(ICEGRID_SDIR)\}.ice{$(ICEGRID_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix IceGrid_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -{$(slicedir)\$(ICEPATCH2_SDIR)\}.ice{$(ICEPATCH2_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix IcePatch2_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -{$(slicedir)\$(ICESTORM_SDIR)\}.ice{$(ICESTORM_SDIR)\}.d: - @echo Generating dependencies for $< - @"$(SLICE2PY)" --prefix IceStorm_ --no-package $(SLICE2PYFLAGS) --depend "$<" | \ - cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice - -depend:: $(DEPENDS) - -Ice_LocalException_ice.py: "$(slicedir)/Ice/LocalException.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/LocalException.ice" - -Ice_Communicator_ice.py: "$(slicedir)/Ice/Communicator.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Communicator.ice" - -Ice_CommunicatorF_ice.py: "$(slicedir)/Ice/CommunicatorF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/CommunicatorF.ice" - -Ice_Logger_ice.py: "$(slicedir)/Ice/Logger.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Logger.ice" - -Ice_LoggerF_ice.py: "$(slicedir)/Ice/LoggerF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/LoggerF.ice" - -Ice_BuiltinSequences_ice.py: "$(slicedir)/Ice/BuiltinSequences.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/BuiltinSequences.ice" - -Ice_ObjectAdapter_ice.py: "$(slicedir)/Ice/ObjectAdapter.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ObjectAdapter.ice" - -Ice_ObjectAdapterF_ice.py: "$(slicedir)/Ice/ObjectAdapterF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ObjectAdapterF.ice" - -Ice_ServantLocator_ice.py: "$(slicedir)/Ice/ServantLocator.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ServantLocator.ice" - -Ice_ServantLocatorF_ice.py: "$(slicedir)/Ice/ServantLocatorF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ServantLocatorF.ice" - -Ice_PropertiesAdmin_ice.py: "$(slicedir)/Ice/PropertiesAdmin.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/PropertiesAdmin.ice" - -Ice_Properties_ice.py: "$(slicedir)/Ice/Properties.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Properties.ice" - -Ice_PropertiesF_ice.py: "$(slicedir)/Ice/PropertiesF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/PropertiesF.ice" - -Ice_ObjectFactory_ice.py: "$(slicedir)/Ice/ObjectFactory.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ObjectFactory.ice" - -Ice_ObjectFactoryF_ice.py: "$(slicedir)/Ice/ObjectFactoryF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ObjectFactoryF.ice" - -Ice_Identity_ice.py: "$(slicedir)/Ice/Identity.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Identity.ice" - -Ice_Current_ice.py: "$(slicedir)/Ice/Current.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Current.ice" - -Ice_ImplicitContext_ice.py: "$(slicedir)/Ice/ImplicitContext.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ImplicitContext.ice" - -Ice_ImplicitContextF_ice.py: "$(slicedir)/Ice/ImplicitContextF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ImplicitContextF.ice" - -Ice_RemoteLogger_ice.py: "$(slicedir)/Ice/RemoteLogger.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/RemoteLogger.ice" - -Ice_Router_ice.py: "$(slicedir)/Ice/Router.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Router.ice" - -Ice_RouterF_ice.py: "$(slicedir)/Ice/RouterF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/RouterF.ice" - -Ice_Plugin_ice.py: "$(slicedir)/Ice/Plugin.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Plugin.ice" - -Ice_PluginF_ice.py: "$(slicedir)/Ice/PluginF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/PluginF.ice" - -Ice_Locator_ice.py: "$(slicedir)/Ice/Locator.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Locator.ice" - -Ice_LocatorF_ice.py: "$(slicedir)/Ice/LocatorF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/LocatorF.ice" - -Ice_Process_ice.py: "$(slicedir)/Ice/Process.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Process.ice" - -Ice_ProcessF_ice.py: "$(slicedir)/Ice/ProcessF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ProcessF.ice" - -Ice_FacetMap_ice.py: "$(slicedir)/Ice/FacetMap.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/FacetMap.ice" - -Ice_Connection_ice.py: "$(slicedir)/Ice/Connection.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Connection.ice" - -Ice_ConnectionF_ice.py: "$(slicedir)/Ice/ConnectionF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/ConnectionF.ice" - -Ice_SliceChecksumDict_ice.py: "$(slicedir)/Ice/SliceChecksumDict.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/SliceChecksumDict.ice" - -Ice_Endpoint_ice.py: "$(slicedir)/Ice/Endpoint.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Endpoint.ice" - -Ice_EndpointF_ice.py: "$(slicedir)/Ice/EndpointF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/EndpointF.ice" - -Ice_EndpointTypes_ice.py: "$(slicedir)/Ice/EndpointTypes.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/EndpointTypes.ice" - -Ice_Version_ice.py: "$(slicedir)/Ice/Version.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Version.ice" - -Ice_Instrumentation_ice.py: "$(slicedir)/Ice/Instrumentation.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/Instrumentation.ice" - -Ice_InstrumentationF_ice.py: "$(slicedir)/Ice/InstrumentationF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package "$(slicedir)/Ice/InstrumentationF.ice" - -Ice_Metrics_ice.py: "$(slicedir)/Ice/Metrics.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Ice_ --no-package --checksum "$(slicedir)/Ice/Metrics.ice" - -Glacier2_RouterF_ice.py: "$(slicedir)/Glacier2/RouterF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/RouterF.ice" - -Glacier2_Router_ice.py: "$(slicedir)/Glacier2/Router.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/Router.ice" - -Glacier2_Session_ice.py: "$(slicedir)/Glacier2/Session.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/Session.ice" - -Glacier2_PermissionsVerifierF_ice.py: "$(slicedir)/Glacier2/PermissionsVerifierF.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/PermissionsVerifierF.ice" - -Glacier2_PermissionsVerifier_ice.py: "$(slicedir)/Glacier2/PermissionsVerifier.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/PermissionsVerifier.ice" - -Glacier2_SSLInfo_ice.py: "$(slicedir)/Glacier2/SSLInfo.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/SSLInfo.ice" - -Glacier2_Metrics_ice.py: "$(slicedir)/Glacier2/Metrics.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix Glacier2_ --no-package --checksum "$(slicedir)/Glacier2/Metrics.ice" - -IceBox_IceBox_ice.py: "$(slicedir)/IceBox/IceBox.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceBox_ --checksum "$(slicedir)/IceBox/IceBox.ice" - -IceGrid_Admin_ice.py: "$(slicedir)/IceGrid/Admin.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Admin.ice" - -IceGrid_Descriptor_ice.py: "$(slicedir)/IceGrid/Descriptor.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Descriptor.ice" - -IceGrid_Exception_ice.py: "$(slicedir)/IceGrid/Exception.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Exception.ice" - -IceGrid_FileParser_ice.py: "$(slicedir)/IceGrid/FileParser.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/FileParser.ice" - -IceGrid_Locator_ice.py: "$(slicedir)/IceGrid/Locator.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Locator.ice" - -IceGrid_Observer_ice.py: "$(slicedir)/IceGrid/Observer.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Observer.ice" - -IceGrid_Query_ice.py: "$(slicedir)/IceGrid/Query.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Query.ice" - -IceGrid_Registry_ice.py: "$(slicedir)/IceGrid/Registry.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Registry.ice" - -IceGrid_Session_ice.py: "$(slicedir)/IceGrid/Session.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/Session.ice" - -IceGrid_UserAccountMapper_ice.py: "$(slicedir)/IceGrid/UserAccountMapper.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceGrid_ --checksum "$(slicedir)/IceGrid/UserAccountMapper.ice" - -IcePatch2_FileInfo_ice.py: "$(slicedir)/IcePatch2/FileInfo.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IcePatch2_ --checksum "$(slicedir)/IcePatch2/FileInfo.ice" - -IcePatch2_FileServer_ice.py: "$(slicedir)/IcePatch2/FileServer.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IcePatch2_ --checksum "$(slicedir)/IcePatch2/FileServer.ice" - -IceStorm_IceStorm_ice.py: "$(slicedir)/IceStorm/IceStorm.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceStorm_ --checksum "$(slicedir)/IceStorm/IceStorm.ice" - -IceStorm_Metrics_ice.py: "$(slicedir)/IceStorm/Metrics.ice" "$(SLICEPARSERLIB)" - "$(SLICE2PY)" $(SLICE2PYFLAGS) --prefix IceStorm_ --checksum "$(slicedir)/IceStorm/Metrics.ice" - -install:: $(ALL_SRCS) - @echo "Installing generated code" - copy *.py "$(install_pythondir)" - @for %i in ( $(PACKAGES) ) do \ - @if not exist "$(install_pythondir)\%i" \ - $(MKDIR) "$(install_pythondir)\%i" - @for %i in ( $(PACKAGES) ) do \ - copy %i\* "$(install_pythondir)\%i" - -clean:: - -rmdir /s /q $(PACKAGES) - del /q *_ice.py - -#include .depend.mak diff --git a/python/test/Ice/acm/AllTests.py b/python/test/Ice/acm/AllTests.py index 9237544a94e..a82b6515db2 100644 --- a/python/test/Ice/acm/AllTests.py +++ b/python/test/Ice/acm/AllTests.py @@ -74,7 +74,7 @@ class LoggerI(Ice.Logger): print(p) self._messages = [] -class TestCase(threading.Thread, Ice.ConnectionCallback): +class TestCase(threading.Thread): def __init__(self, name, com): threading.Thread.__init__(self) self._name = name @@ -128,7 +128,9 @@ class TestCase(threading.Thread, Ice.ConnectionCallback): proxy = Test.TestIntfPrx.uncheckedCast(self._communicator.stringToProxy( self._adapter.getTestIntf().ice_toString())) try: - proxy.ice_getConnection().setCallback(self) + proxy.ice_getConnection().setCloseCallback(lambda conn: self.closed(conn)) + proxy.ice_getConnection().setHeartbeatCallback(lambda conn: self.heartbeat(conn)) + self.runTestCase(self._adapter, proxy) except Exception as ex: self._msg = "unexpected exception:\n" + traceback.format_exc() diff --git a/python/test/Ice/acm/TestI.py b/python/test/Ice/acm/TestI.py index 088c2b4ed81..920cbd44c7e 100644 --- a/python/test/Ice/acm/TestI.py +++ b/python/test/Ice/acm/TestI.py @@ -79,7 +79,7 @@ class TestIntfI(Test.TestIntf): def waitForHeartbeat(self, count, current=None): - class ConnectionCallbackI(Ice.ConnectionCallback): + class ConnectionCallbackI(): def __init__(self): self.m = threading.Condition() @@ -93,9 +93,6 @@ class TestIntfI(Test.TestIntf): finally: self.m.release() - def closed(self, con): - pass - def waitForCount(self, count): self.m.acquire() self.count = count @@ -106,6 +103,6 @@ class TestIntfI(Test.TestIntf): self.m.release() callback = ConnectionCallbackI() - current.con.setCallback(callback) + current.con.setHeartbeatCallback(lambda con: callback.heartbeat(con)) callback.waitForCount(2) diff --git a/python/test/Ice/acm/run.py b/python/test/Ice/acm/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/acm/run.py +++ b/python/test/Ice/acm/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/adapterDeactivation/run.py b/python/test/Ice/adapterDeactivation/run.py index 89beb6cd7a7..e285170381d 100755 --- a/python/test/Ice/adapterDeactivation/run.py +++ b/python/test/Ice/adapterDeactivation/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/ami/run.py b/python/test/Ice/ami/run.py index 2b105e19f21..e285170381d 100755 --- a/python/test/Ice/ami/run.py +++ b/python/test/Ice/ami/run.py @@ -20,7 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with collocated server.") -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/binding/run.py b/python/test/Ice/binding/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/binding/run.py +++ b/python/test/Ice/binding/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/blobject/run.py b/python/test/Ice/blobject/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/blobject/run.py +++ b/python/test/Ice/blobject/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/checksum/run.py b/python/test/Ice/checksum/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/checksum/run.py +++ b/python/test/Ice/checksum/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/enums/run.py b/python/test/Ice/enums/run.py index 6870d8dcd2a..b7e267999af 100755 --- a/python/test/Ice/enums/run.py +++ b/python/test/Ice/enums/run.py @@ -20,9 +20,9 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with 1.1 encoding.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "1.1", message = "Running test with 1.1 encoding.") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/exceptions/AllTests.py b/python/test/Ice/exceptions/AllTests.py index 60fc7b26e47..97d68ecabb0 100644 --- a/python/test/Ice/exceptions/AllTests.py +++ b/python/test/Ice/exceptions/AllTests.py @@ -26,12 +26,8 @@ class ServantLocatorI(Ice.ServantLocator): def deactivate(self, category): pass -class ObjectFactoryI(Ice.ObjectFactory): - def create(id): - return None - - def destroy(): - pass +def ValueFactory(type): + return None class CallbackBase: def __init__(self): @@ -273,10 +269,10 @@ def allTests(communicator): sys.stdout.write("testing object factory registration exception... ") sys.stdout.flush() - of = ObjectFactoryI() - communicator.addObjectFactory(of, "x") + + communicator.getValueFactoryManager().add(ValueFactory, "x") try: - communicator.addObjectFactory(of, "x") + communicator.getValueFactoryManager().add(ValueFactory, "x") test(false) except Ice.AlreadyRegisteredException: pass diff --git a/python/test/Ice/exceptions/run.py b/python/test/Ice/exceptions/run.py index a8abeacb386..730e27ae290 100755 --- a/python/test/Ice/exceptions/run.py +++ b/python/test/Ice/exceptions/run.py @@ -20,29 +20,29 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with compact (default) format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "compactAMD", localOnly = True, + message = "Running test with compact (default) format and AMD server.", + server="ServerAMD.py") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/facets/run.py b/python/test/Ice/facets/run.py index 89beb6cd7a7..e285170381d 100755 --- a/python/test/Ice/facets/run.py +++ b/python/test/Ice/facets/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/info/AllTests.py b/python/test/Ice/info/AllTests.py index b80182b5c04..a03b69ecc4d 100644 --- a/python/test/Ice/info/AllTests.py +++ b/python/test/Ice/info/AllTests.py @@ -13,6 +13,18 @@ def test(b): if not b: raise RuntimeError('test assertion failed') +def getTCPEndpointInfo(info): + while(info): + if isinstance(info, Ice.TCPEndpointInfo): + return info + info = info.underlying + +def getTCPConnectionInfo(info): + while(info): + if isinstance(info, Ice.TCPConnectionInfo): + return info + info = info.underlying + def allTests(communicator): sys.stdout.write("testing proxy endpoint information... ") sys.stdout.flush() @@ -23,22 +35,23 @@ def allTests(communicator): endps = p1.ice_getEndpoints() - ipEndpoint = endps[0].getInfo() - test(isinstance(ipEndpoint, Ice.IPEndpointInfo)) - test(ipEndpoint.host == "tcphost") - test(ipEndpoint.port == 10000) - test(ipEndpoint.sourceAddress == "10.10.10.10") - test(ipEndpoint.timeout == 1200) - test(ipEndpoint.compress) - test(not ipEndpoint.datagram()) - test((ipEndpoint.type() == Ice.TCPEndpointType and not ipEndpoint.secure()) or - (ipEndpoint.type() == Ice.SSLEndpointType and ipEndpoint.secure()) or # SSL - (ipEndpoint.type() == Ice.WSEndpointType and not ipEndpoint.secure()) or # WS - (ipEndpoint.type() == Ice.WSSEndpointType and ipEndpoint.secure())) # WS - test((ipEndpoint.type() == Ice.TCPEndpointType and isinstance(ipEndpoint, Ice.TCPEndpointInfo)) or - (ipEndpoint.type() == Ice.SSLEndpointType and isinstance(ipEndpoint, Ice.SSLEndpointInfo)) or - (ipEndpoint.type() == Ice.WSEndpointType and isinstance(ipEndpoint, Ice.WSEndpointInfo)) or - (ipEndpoint.type() == Ice.WSSEndpointType and isinstance(ipEndpoint, Ice.WSSEndpointInfo))) + endpoint = endps[0].getInfo() + tcpEndpoint = getTCPEndpointInfo(endpoint) + test(isinstance(tcpEndpoint, Ice.TCPEndpointInfo)) + test(tcpEndpoint.host == "tcphost") + test(tcpEndpoint.port == 10000) + test(tcpEndpoint.sourceAddress == "10.10.10.10") + test(tcpEndpoint.timeout == 1200) + test(tcpEndpoint.compress) + test(not tcpEndpoint.datagram()) + test((tcpEndpoint.type() == Ice.TCPEndpointType and not tcpEndpoint.secure()) or + (tcpEndpoint.type() == Ice.SSLEndpointType and tcpEndpoint.secure()) or # SSL + (tcpEndpoint.type() == Ice.WSEndpointType and not tcpEndpoint.secure()) or # WS + (tcpEndpoint.type() == Ice.WSSEndpointType and tcpEndpoint.secure())) # WS + test((tcpEndpoint.type() == Ice.TCPEndpointType and isinstance(endpoint, Ice.TCPEndpointInfo)) or + (tcpEndpoint.type() == Ice.SSLEndpointType and isinstance(endpoint, Ice.SSLEndpointInfo)) or + (tcpEndpoint.type() == Ice.WSEndpointType and isinstance(endpoint, Ice.WSEndpointInfo)) or + (tcpEndpoint.type() == Ice.WSSEndpointType and isinstance(endpoint, Ice.WSEndpointInfo))) udpEndpoint = endps[1].getInfo() test(isinstance(udpEndpoint, Ice.UDPEndpointInfo)) @@ -71,12 +84,12 @@ def allTests(communicator): publishedEndpoints = adapter.getPublishedEndpoints() test(endpoints == publishedEndpoints) - ipEndpoint = endpoints[0].getInfo() - test(ipEndpoint.type() == Ice.TCPEndpointType or ipEndpoint.type() == 2 or ipEndpoint.type() == 4 or - ipEndpoint.type() == 5) - test(ipEndpoint.host == defaultHost) - test(ipEndpoint.port > 0) - test(ipEndpoint.timeout == 15000) + tcpEndpoint = getTCPEndpointInfo(endpoints[0].getInfo()) + test(tcpEndpoint.type() == Ice.TCPEndpointType or tcpEndpoint.type() == 2 or tcpEndpoint.type() == 4 or + tcpEndpoint.type() == 5) + test(tcpEndpoint.host == defaultHost) + test(tcpEndpoint.port > 0) + test(tcpEndpoint.timeout == 15000) udpEndpoint = endpoints[1].getInfo() test(udpEndpoint.host == defaultHost) @@ -95,12 +108,12 @@ def allTests(communicator): test(len(publishedEndpoints) == 1) for i in range(0, len(endpoints)): - ipEndpoint = endpoints[i].getInfo() - test(ipEndpoint.port == 12020) + tcpEndpoint = getTCPEndpointInfo(endpoints[i].getInfo()) + test(tcpEndpoint.port == 12020) - ipEndpoint = publishedEndpoints[0].getInfo() - test(ipEndpoint.host == "127.0.0.1") - test(ipEndpoint.port == 12020) + tcpEndpoint = getTCPEndpointInfo(publishedEndpoints[0].getInfo()) + test(tcpEndpoint.host == "127.0.0.1") + test(tcpEndpoint.port == 12020) adapter.destroy() @@ -112,13 +125,13 @@ def allTests(communicator): sys.stdout.write("test connection endpoint information... ") sys.stdout.flush() - ipinfo = base.ice_getConnection().getEndpoint().getInfo() - test(ipinfo.port == 12010) - test(not ipinfo.compress) - test(ipinfo.host == defaultHost) + tcpinfo = getTCPEndpointInfo(base.ice_getConnection().getEndpoint().getInfo()) + test(tcpinfo.port == 12010) + test(not tcpinfo.compress) + test(tcpinfo.host == defaultHost) ctx = testIntf.getEndpointInfoAsContext() - test(ctx["host"] == ipinfo.host) + test(ctx["host"] == tcpinfo.host) test(ctx["compress"] == "false") port = int(ctx["port"]) test(port > 0) @@ -136,26 +149,26 @@ def allTests(communicator): connection.setBufferSize(1024, 2048) info = connection.getInfo() + tcpinfo = getTCPConnectionInfo(info) test(not info.incoming) test(len(info.adapterName) == 0) - test(info.remotePort == 12010) + test(tcpinfo.remotePort == 12010) if defaultHost == '127.0.0.1': - test(info.remoteAddress == defaultHost) - test(info.localAddress == defaultHost) - test(info.rcvSize >= 1024) - test(info.sndSize >= 2048) + test(tcpinfo.remoteAddress == defaultHost) + test(tcpinfo.localAddress == defaultHost) + test(tcpinfo.rcvSize >= 1024) + test(tcpinfo.sndSize >= 2048) ctx = testIntf.getConnectionInfoAsContext() test(ctx["incoming"] == "true") test(ctx["adapterName"] == "TestAdapter") - test(ctx["remoteAddress"] == info.localAddress) - test(ctx["localAddress"] == info.remoteAddress) - test(ctx["remotePort"] == str(info.localPort)) - test(ctx["localPort"] == str(info.remotePort)) + test(ctx["remoteAddress"] == tcpinfo.localAddress) + test(ctx["localAddress"] == tcpinfo.remoteAddress) + test(ctx["remotePort"] == str(tcpinfo.localPort)) + test(ctx["localPort"] == str(tcpinfo.remotePort)) if(base.ice_getConnection().type() == "ws" or base.ice_getConnection().type() == "wss"): - test((base.ice_getConnection().type() == "ws" and isinstance(info, Ice.WSConnectionInfo)) or - (base.ice_getConnection().type() == "wss" and isinstance(info, Ice.WSSConnectionInfo))) + test(isinstance(info, Ice.WSConnectionInfo)) test(info.headers["Upgrade"] == "websocket") test(info.headers["Connection"] == "Upgrade") diff --git a/python/test/Ice/info/TestI.py b/python/test/Ice/info/TestI.py index ff98b4dd777..2325156db20 100644 --- a/python/test/Ice/info/TestI.py +++ b/python/test/Ice/info/TestI.py @@ -10,6 +10,18 @@ import Ice, Test import time +def getIPEndpointInfo(info): + while(info): + if isinstance(info, Ice.IPEndpointInfo): + return info + info = info.underlying + +def getIPConnectionInfo(info): + while(info): + if isinstance(info, Ice.IPConnectionInfo): + return info + info = info.underlying + class MyDerivedClassI(Test.TestIntf): def __init__(self): self.ctx = None @@ -19,7 +31,7 @@ class MyDerivedClassI(Test.TestIntf): def getEndpointInfoAsContext(self, current): ctx = {} - info = current.con.getEndpoint().getInfo() + info = getIPEndpointInfo(current.con.getEndpoint().getInfo()) ctx["timeout"] = str(info.timeout) if info.compress: ctx["compress"] = "true" @@ -51,18 +63,19 @@ class MyDerivedClassI(Test.TestIntf): def getConnectionInfoAsContext(self, current): ctx = {} info = current.con.getInfo() + ipinfo = getIPConnectionInfo(info) ctx["adapterName"] = info.adapterName if info.incoming: ctx["incoming"] = "true" else: ctx["incoming"] ="false" - ctx["localAddress"] = info.localAddress - ctx["localPort"] = str(info.localPort) - ctx["remoteAddress"] = info.remoteAddress - ctx["remotePort"] = str(info.remotePort) + ctx["localAddress"] = ipinfo.localAddress + ctx["localPort"] = str(ipinfo.localPort) + ctx["remoteAddress"] = ipinfo.remoteAddress + ctx["remotePort"] = str(ipinfo.remotePort) - if isinstance(info, Ice.WSConnectionInfo) or isinstance(info, Ice.WSSConnectionInfo): + if isinstance(info, Ice.WSConnectionInfo): for key, value in info.headers.items(): ctx["ws." + key] = value diff --git a/python/test/Ice/info/run.py b/python/test/Ice/info/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/info/run.py +++ b/python/test/Ice/info/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/inheritance/run.py b/python/test/Ice/inheritance/run.py index 89beb6cd7a7..e285170381d 100755 --- a/python/test/Ice/inheritance/run.py +++ b/python/test/Ice/inheritance/run.py @@ -20,5 +20,6 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() -TestUtil.collocatedTest() +TestUtil.queueClientServerTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/location/AllTests.py b/python/test/Ice/location/AllTests.py index e12650b1837..91519152101 100644 --- a/python/test/Ice/location/AllTests.py +++ b/python/test/Ice/location/AllTests.py @@ -47,8 +47,8 @@ def allTests(communicator, ref): test(Ice.proxyIdentityEqual(base.ice_getLocator(), anotherLocator)); communicator.setDefaultLocator(locator); base = communicator.stringToProxy("test @ TestAdapter"); - test(Ice.proxyIdentityEqual(base.ice_getLocator(), communicator.getDefaultLocator())); - + test(Ice.proxyIdentityEqual(base.ice_getLocator(), communicator.getDefaultLocator())); + # # We also test ice_router/ice_getRouter (perhaps we should add a # test/Ice/router test?) @@ -106,24 +106,28 @@ def allTests(communicator, ref): try: obj3 = Test.TestIntfPrx.checkedCast(base3) obj3.ice_ping() - except Ice.LocalException: + except Ice.LocalException as ex: + print(ex) test(False) try: obj2 = Test.TestIntfPrx.checkedCast(base2) obj2.ice_ping() - except Ice.LocalException: + except Ice.LocalException as ex: + print(ex) test(False) obj.shutdown() manager.startServer() try: obj2 = Test.TestIntfPrx.checkedCast(base2) obj2.ice_ping() - except Ice.LocalException: + except Ice.LocalException as ex: + print(ex) test(False) try: obj3 = Test.TestIntfPrx.checkedCast(base3) obj3.ice_ping() - except Ice.LocalException: + except Ice.LocalException as ex: + print(ex) test(False) obj.shutdown() manager.startServer() @@ -243,7 +247,7 @@ def allTests(communicator, ref): id.name = Ice.generateUUID(); registry.addObject(adapter.add(HelloI(), id)); adapter.activate(); - + helloPrx = Test.HelloPrx.checkedCast(communicator.stringToProxy(communicator.identityToString(id))); test(not helloPrx.ice_getConnection()); diff --git a/python/test/Ice/location/run.py b/python/test/Ice/location/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/location/run.py +++ b/python/test/Ice/location/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/objects/AllTests.py b/python/test/Ice/objects/AllTests.py index ddfa9c2e78a..c38778c51ae 100644 --- a/python/test/Ice/objects/AllTests.py +++ b/python/test/Ice/objects/AllTests.py @@ -9,28 +9,30 @@ import Ice, Test, TestI, sys +def MyValueFactory(type): + if type == '::Test::B': + return TestI.BI() + elif type == '::Test::C': + return TestI.CI() + elif type == '::Test::D': + return TestI.DI() + elif type == '::Test::E': + return TestI.EI() + elif type == '::Test::F': + return TestI.FI() + elif type == '::Test::I': + return TestI.II() + elif type == '::Test::J': + return TestI.JI() + elif type == '::Test::H': + return TestI.HI() + assert(False) # Should never be reached + class MyObjectFactory(Ice.ObjectFactory): def create(self, type): - if type == '::Test::B': - return TestI.BI() - elif type == '::Test::C': - return TestI.CI() - elif type == '::Test::D': - return TestI.DI() - elif type == '::Test::E': - return TestI.EI() - elif type == '::Test::F': - return TestI.FI() - elif type == '::Test::I': - return TestI.II() - elif type == '::Test::J': - return TestI.JI() - elif type == '::Test::H': - return TestI.HI() - assert(False) # Should never be reached - - def destroy(self): - # Nothing to do + return None + + def destroy(): pass def test(b): @@ -38,15 +40,16 @@ def test(b): raise RuntimeError('test assertion failed') def allTests(communicator): - factory = MyObjectFactory() - communicator.addObjectFactory(factory, '::Test::B') - communicator.addObjectFactory(factory, '::Test::C') - communicator.addObjectFactory(factory, '::Test::D') - communicator.addObjectFactory(factory, '::Test::E') - communicator.addObjectFactory(factory, '::Test::F') - communicator.addObjectFactory(factory, '::Test::I') - communicator.addObjectFactory(factory, '::Test::J') - communicator.addObjectFactory(factory, '::Test::H') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::B') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::C') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::D') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::E') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::F') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::I') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::J') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::H') + + communicator.addObjectFactory(MyObjectFactory(), "TestOF") sys.stdout.write("testing stringToProxy... ") sys.stdout.flush() @@ -67,19 +70,19 @@ def allTests(communicator): b1 = initial.getB1() test(b1) print("ok") - + sys.stdout.write("getting B2... ") sys.stdout.flush() b2 = initial.getB2() test(b2) print("ok") - + sys.stdout.write("getting C... ") sys.stdout.flush() c = initial.getC() test(c) print("ok") - + sys.stdout.write("getting D... ") sys.stdout.flush() d = initial.getD() @@ -97,7 +100,7 @@ def allTests(communicator): test(f.e2.checkValues()) test(f._e1.checkValues()) print("ok") - + sys.stdout.write("getting I, J, H... ") sys.stdout.flush() i = initial.getI() @@ -107,7 +110,7 @@ def allTests(communicator): h = initial.getH() test(isinstance(h, Test.H)) print("ok") - + sys.stdout.write("getting D1... ") sys.stdout.flush() d1 = initial.getD1(Test.D1(Test.A1("a1"), Test.A1("a2"), Test.A1("a3"), Test.A1("a4"))); @@ -116,7 +119,7 @@ def allTests(communicator): test(d1.a3.name == "a3") test(d1.a4.name == "a4") print("ok") - + sys.stdout.write("throw EDerived... ") sys.stdout.flush() try: @@ -135,7 +138,7 @@ def allTests(communicator): initial.setI(TestI.JI()) initial.setI(TestI.HI()) print("ok") - + sys.stdout.write("checking consistency... ") sys.stdout.flush() test(b1 != b2) @@ -170,7 +173,7 @@ def allTests(communicator): test(c) test(d) print("ok") - + sys.stdout.write("checking consistency... ") sys.stdout.flush() test(b1 != b2) @@ -220,7 +223,7 @@ def allTests(communicator): print("ok") # Don't run this test with collocation, this should work with collocation - # but the test isn't written to support it (we'd need support for the + # but the test isn't written to support it (we'd need support for the # streaming interface) if initial.ice_getConnection(): sys.stdout.write("testing UnexpectedObjectException... ") @@ -244,4 +247,14 @@ def allTests(communicator): test(False) print("ok") + sys.stdout.write("testing getting ObjectFactory... ") + sys.stdout.flush() + test(communicator.findObjectFactory("TestOF") != None) + print("ok") + + sys.stdout.write("testing getting ObjectFactory as ValueFactory... ") + sys.stdout.flush() + test(communicator.getValueFactoryManager().find("TestOF") != None) + print("ok") + return initial diff --git a/python/test/Ice/objects/Server.py b/python/test/Ice/objects/Server.py index 571a7048399..0758fc4009b 100755 --- a/python/test/Ice/objects/Server.py +++ b/python/test/Ice/objects/Server.py @@ -15,25 +15,19 @@ Ice.loadSlice('Test.ice') Ice.loadSlice('ServerPrivate.ice') import Test, TestI -class MyObjectFactory(Ice.ObjectFactory): - def create(self, type): - if type == '::Test::I': - return TestI.II() - elif type == '::Test::J': - return TestI.JI() - elif type == '::Test::H': - return TestI.HI() - assert(False) # Should never be reached - - def destroy(self): - # Nothing to do - pass +def MyValueFactory(type): + if type == '::Test::I': + return TestI.II() + elif type == '::Test::J': + return TestI.JI() + elif type == '::Test::H': + return TestI.HI() + assert(False) # Should never be reached def run(args, communicator): - factory = MyObjectFactory() - communicator.addObjectFactory(factory, '::Test::I') - communicator.addObjectFactory(factory, '::Test::J') - communicator.addObjectFactory(factory, '::Test::H') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::I') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::J') + communicator.getValueFactoryManager().add(MyValueFactory, '::Test::H') communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010") adapter = communicator.createObjectAdapter("TestAdapter") diff --git a/python/test/Ice/objects/run.py b/python/test/Ice/objects/run.py index 5a1f1d88b9b..53b64ebcc37 100755 --- a/python/test/Ice/objects/run.py +++ b/python/test/Ice/objects/run.py @@ -20,16 +20,15 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", - additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running collocated test.") -TestUtil.collocatedTest() +TestUtil.queueCollocatedTest() +TestUtil.runQueuedTests() diff --git a/python/test/Ice/operations/run.py b/python/test/Ice/operations/run.py index 600e5723b9d..83b76a7726f 100755 --- a/python/test/Ice/operations/run.py +++ b/python/test/Ice/operations/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/optional/AllTests.py b/python/test/Ice/optional/AllTests.py index e2c20f64783..3531365239a 100644 --- a/python/test/Ice/optional/AllTests.py +++ b/python/test/Ice/optional/AllTests.py @@ -718,6 +718,15 @@ def allTests(communicator): (p2, p3) = initial.end_opStringIntDict(r) test(p2 == p1 and p3 == p1) + (p2, p3) = initial.opIntOneOptionalDict(Ice.Unset) + test(p2 is Ice.Unset and p3 is Ice.Unset) + p1 = {1:Test.OneOptional(58), 2:Test.OneOptional(59)} + (p2, p3) = initial.opIntOneOptionalDict(p1) + test(p2[1].a == 58 and p3[1].a == 58); + r = initial.begin_opIntOneOptionalDict(p1) + (p2, p3) = initial.end_opIntOneOptionalDict(r) + test(p2[1].a == 58 and p3[1].a == 58); + print("ok") sys.stdout.write("testing exception optionals... ") diff --git a/python/test/Ice/optional/Server.py b/python/test/Ice/optional/Server.py index 6d0a280169a..bf4236de34d 100755 --- a/python/test/Ice/optional/Server.py +++ b/python/test/Ice/optional/Server.py @@ -129,6 +129,9 @@ class InitialI(Test.Initial): def opStringIntDict(self, p1, current=None): return (p1, p1) + def opIntOneOptionalDict(self, p1, current=None): + return (p1, p1) + def opClassAndUnknownOptional(self, p, current=None): pass diff --git a/python/test/Ice/optional/ServerAMD.py b/python/test/Ice/optional/ServerAMD.py index 0f42e827343..a300cf17e22 100755 --- a/python/test/Ice/optional/ServerAMD.py +++ b/python/test/Ice/optional/ServerAMD.py @@ -130,6 +130,9 @@ class InitialI(Test.Initial): def opStringIntDict_async(self, cb, p1, current=None): cb.ice_response(p1, p1) + def opIntOneOptionalDict_async(self, cb, p1, current=None): + cb.ice_response(p1, p1) + def opClassAndUnknownOptional_async(self, cb, p, current=None): cb.ice_response() diff --git a/python/test/Ice/optional/Test.ice b/python/test/Ice/optional/Test.ice index af85be2c2b2..73bfd77814c 100644 --- a/python/test/Ice/optional/Test.ice +++ b/python/test/Ice/optional/Test.ice @@ -271,6 +271,9 @@ class Initial optional(1) StringIntDict opStringIntDict(optional(2) StringIntDict p1, out optional(3) StringIntDict p3); + optional(1) IntOneOptionalDict opIntOneOptionalDict(optional(2) IntOneOptionalDict p1, + out optional(3) IntOneOptionalDict p3); + void opClassAndUnknownOptional(A p); void sendOptionalClass(bool req, optional(1) OneOptional o); diff --git a/python/test/Ice/optional/TestAMD.ice b/python/test/Ice/optional/TestAMD.ice index 247915c4623..6510fcbcc5f 100644 --- a/python/test/Ice/optional/TestAMD.ice +++ b/python/test/Ice/optional/TestAMD.ice @@ -272,6 +272,9 @@ class Initial optional(1) StringIntDict opStringIntDict(optional(2) StringIntDict p1, out optional(3) StringIntDict p3); + optional(1) IntOneOptionalDict opIntOneOptionalDict(optional(2) IntOneOptionalDict p1, + out optional(3) IntOneOptionalDict p3); + void opClassAndUnknownOptional(A p); void sendOptionalClass(bool req, optional(1) OneOptional o); diff --git a/python/test/Ice/optional/run.py b/python/test/Ice/optional/run.py index a0d8bb9a295..44156a1671c 100755 --- a/python/test/Ice/optional/run.py +++ b/python/test/Ice/optional/run.py @@ -20,9 +20,10 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with compact (default) format.") -TestUtil.clientServerTest() -print("Running test with sliced format.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.SlicedFormat", additionalServerOptions="--Ice.Default.SlicedFormat") -print("Running test with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "compact", message = "Running test with compact (default) format.") +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.", + additionalClientOptions="--Ice.Default.SlicedFormat", + additionalServerOptions="--Ice.Default.SlicedFormat") +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/proxy/run.py b/python/test/Ice/proxy/run.py index 600e5723b9d..83b76a7726f 100755 --- a/python/test/Ice/proxy/run.py +++ b/python/test/Ice/proxy/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/servantLocator/AllTests.py b/python/test/Ice/servantLocator/AllTests.py index 73b55b42b69..c55e1743b08 100644 --- a/python/test/Ice/servantLocator/AllTests.py +++ b/python/test/Ice/servantLocator/AllTests.py @@ -52,7 +52,7 @@ def testExceptions(obj, collocated): obj.userException() test(False) except Ice.UnknownUserException as ex: - test(ex.unknown.find("Test::TestIntfUserException") >= 0) + test(ex.unknown.find("::Test::TestIntfUserException") >= 0) except Ice.OperationNotExistException: pass except AttributeError: @@ -148,7 +148,7 @@ def allTests(communicator, collocated): obj.ice_ids() test(False) except Ice.UnknownUserException as ex: - test(ex.unknown == "Test::TestIntfUserException") + test(ex.unknown == "::Test::TestIntfUserException") except: test(False) @@ -157,7 +157,7 @@ def allTests(communicator, collocated): obj.ice_ids() test(False) except Ice.UnknownUserException as ex: - test(ex.unknown == "Test::TestIntfUserException") + test(ex.unknown == "::Test::TestIntfUserException") except: test(False) print("ok") diff --git a/python/test/Ice/servantLocator/run.py b/python/test/Ice/servantLocator/run.py index 600e5723b9d..83b76a7726f 100755 --- a/python/test/Ice/servantLocator/run.py +++ b/python/test/Ice/servantLocator/run.py @@ -20,9 +20,8 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("tests with regular server.") -TestUtil.clientServerTest() -print("tests with AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") -print("tests with collocated server.") -TestUtil.collocatedTest(" --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.queueClientServerTest() +TestUtil.queueClientServerTest(configName = "amd", localOnly = True, message = "Running test with AMD server.", + server="ServerAMD.py") +TestUtil.queueCollocatedTest(additionalOptions = " --Ice.ThreadPool.Client.SizeMax=2 --Ice.ThreadPool.Client.SizeWarn=0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/slicing/exceptions/AllTests.py b/python/test/Ice/slicing/exceptions/AllTests.py index 12c0283c07e..b3fa67dd502 100644 --- a/python/test/Ice/slicing/exceptions/AllTests.py +++ b/python/test/Ice/slicing/exceptions/AllTests.py @@ -46,7 +46,7 @@ class Callback(CallbackBase): raise exc except Test.Base as b: test(b.b == "Base.b") - test(b.ice_name() =="Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) self.called() @@ -56,7 +56,7 @@ class Callback(CallbackBase): raise exc except Test.Base as b: test(b.b == "UnknownDerived.b") - test(b.ice_name() =="Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) self.called() @@ -67,7 +67,7 @@ class Callback(CallbackBase): except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") - test(k.ice_name() =="Test::KnownDerived") + test(k.ice_id() == "::Test::KnownDerived") except: test(False) self.called() @@ -78,7 +78,7 @@ class Callback(CallbackBase): except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") - test(k.ice_name() =="Test::KnownDerived") + test(k.ice_id() == "::Test::KnownDerived") except: test(False) self.called() @@ -88,7 +88,7 @@ class Callback(CallbackBase): raise exc except Test.Base as b: test(b.b == "UnknownIntermediate.b") - test(b.ice_name() =="Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) self.called() @@ -99,7 +99,7 @@ class Callback(CallbackBase): except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") - test(ki.ice_name() =="Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) self.called() @@ -111,7 +111,7 @@ class Callback(CallbackBase): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() =="Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) self.called() @@ -122,7 +122,7 @@ class Callback(CallbackBase): except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") - test(ki.ice_name() =="Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) self.called() @@ -134,7 +134,7 @@ class Callback(CallbackBase): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() =="Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) self.called() @@ -146,7 +146,7 @@ class Callback(CallbackBase): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() =="Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) self.called() @@ -157,7 +157,7 @@ class Callback(CallbackBase): except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") - test(ki.ice_name() =="Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) self.called() @@ -168,7 +168,7 @@ class Callback(CallbackBase): except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") - test(ki.ice_name() =="Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) self.called() @@ -178,7 +178,7 @@ class Callback(CallbackBase): raise exc except Test.Base as b: test(b.b == "UnknownMostDerived2.b") - test(b.ice_name() =="Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) self.called() @@ -227,7 +227,7 @@ def allTests(communicator): test(false) except Test.Base as b: test(b.b == "Base.b") - test(b.ice_name() == "Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) print("ok") @@ -246,7 +246,7 @@ def allTests(communicator): test(false) except Test.Base as b: test(b.b == "UnknownDerived.b") - test(b.ice_name() == "Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) print("ok") @@ -266,7 +266,7 @@ def allTests(communicator): except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") - test(k.ice_name() == "Test::KnownDerived") + test(k.ice_id() == "::Test::KnownDerived") except: test(False) print("ok") @@ -286,7 +286,7 @@ def allTests(communicator): except Test.KnownDerived as k: test(k.b == "KnownDerived.b") test(k.kd == "KnownDerived.kd") - test(k.ice_name() == "Test::KnownDerived") + test(k.ice_id() == "::Test::KnownDerived") except: test(False) print("ok") @@ -305,7 +305,7 @@ def allTests(communicator): test(false) except Test.Base as b: test(b.b == "UnknownIntermediate.b") - test(b.ice_name() == "Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) print("ok") @@ -325,7 +325,7 @@ def allTests(communicator): except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") - test(ki.ice_name() == "Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) print("ok") @@ -346,7 +346,7 @@ def allTests(communicator): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() == "Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) print("ok") @@ -366,7 +366,7 @@ def allTests(communicator): except Test.KnownIntermediate as ki: test(ki.b == "KnownIntermediate.b") test(ki.ki == "KnownIntermediate.ki") - test(ki.ice_name() == "Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) print("ok") @@ -387,7 +387,7 @@ def allTests(communicator): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() == "Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) print("ok") @@ -408,7 +408,7 @@ def allTests(communicator): test(kmd.b == "KnownMostDerived.b") test(kmd.ki == "KnownMostDerived.ki") test(kmd.kmd == "KnownMostDerived.kmd") - test(kmd.ice_name() == "Test::KnownMostDerived") + test(kmd.ice_id() == "::Test::KnownMostDerived") except: test(False) print("ok") @@ -428,7 +428,7 @@ def allTests(communicator): except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") - test(ki.ice_name() == "Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) print("ok") @@ -448,7 +448,7 @@ def allTests(communicator): except Test.KnownIntermediate as ki: test(ki.b == "UnknownMostDerived1.b") test(ki.ki == "UnknownMostDerived1.ki") - test(ki.ice_name() == "Test::KnownIntermediate") + test(ki.ice_id() == "::Test::KnownIntermediate") except: test(False) print("ok") @@ -467,7 +467,7 @@ def allTests(communicator): test(false) except Test.Base as b: test(b.b == "UnknownMostDerived2.b") - test(b.ice_name() == "Test::Base") + test(b.ice_id() == "::Test::Base") except: test(False) print("ok") diff --git a/python/test/Ice/slicing/exceptions/run.py b/python/test/Ice/slicing/exceptions/run.py index 7af9d62fa74..6cf3085058b 100755 --- a/python/test/Ice/slicing/exceptions/run.py +++ b/python/test/Ice/slicing/exceptions/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/slicing/objects/AllTests.py b/python/test/Ice/slicing/objects/AllTests.py index 04f2d502453..fda1c80886c 100644 --- a/python/test/Ice/slicing/objects/AllTests.py +++ b/python/test/Ice/slicing/objects/AllTests.py @@ -68,14 +68,14 @@ class Callback(CallbackBase): test(False) def exception_SBSUnknownDerivedAsSBaseCompact(self, ex): - test(isinstance(ex, Ice.NoObjectFactoryException)) + test(isinstance(ex, Ice.NoValueFactoryException)) self.called() def response_SUnknownAsObject10(self, o): test(False) def exception_SUnknownAsObject10(self, exc): - test(exc.ice_name() == "Ice::NoObjectFactoryException") + test(exc.ice_id() == "::Ice::NoValueFactoryException") self.called() def response_SUnknownAsObject11(self, o): @@ -224,7 +224,7 @@ class Callback(CallbackBase): self.called() def exception_throwBaseAsBase(self, ex): - test(ex.ice_name() == "Test::BaseException") + test(ex.ice_id() == "::Test::BaseException") e = ex test(isinstance(e, Test.BaseException)) test(e.sbe == "sbe") @@ -234,7 +234,7 @@ class Callback(CallbackBase): self.called() def exception_throwDerivedAsBase(self, ex): - test(ex.ice_name() == "Test::DerivedException") + test(ex.ice_id() == "::Test::DerivedException") e = ex test(isinstance(e, Test.DerivedException)) test(e.sbe == "sbe") @@ -250,7 +250,7 @@ class Callback(CallbackBase): self.called() def exception_throwDerivedAsDerived(self, ex): - test(ex.ice_name() == "Test::DerivedException") + test(ex.ice_id() == "::Test::DerivedException") e = ex test(isinstance(e, Test.DerivedException)) test(e.sbe == "sbe") @@ -266,7 +266,7 @@ class Callback(CallbackBase): self.called() def exception_throwUnknownDerivedAsBase(self, ex): - test(ex.ice_name() == "Test::BaseException") + test(ex.ice_id() == "::Test::BaseException") e = ex test(isinstance(e, Test.BaseException)) test(e.sbe == "sbe") @@ -359,14 +359,10 @@ class PNodeI(Test.PNode): def __del__(self): PNodeI.counter = PNodeI.counter - 1 -class NodeFactoryI(Ice.ObjectFactory): - def create(self, id): - if id == Test.PNode.ice_staticId(): - return PNodeI() - return None - - def destroy(self): - pass +def NodeFactoryI(id): + if id == Test.PNode.ice_staticId(): + return PNodeI() + return None class PreservedI(Test.Preserved): counter = 0 @@ -377,14 +373,10 @@ class PreservedI(Test.Preserved): def __del__(self): PreservedI.counter = PreservedI.counter - 1 -class PreservedFactoryI(Ice.ObjectFactory): - def create(self, id): - if id == Test.Preserved.ice_staticId(): - return PreservedI() - return None - - def destroy(self): - pass +def PreservedFactoryI(id): + if id == Test.Preserved.ice_staticId(): + return PreservedI() + return None def allTests(communicator): obj = communicator.stringToProxy("Test:default -p 12010") @@ -492,7 +484,7 @@ def allTests(communicator): test(False) except Ice.OperationNotExistException: pass - except Ice.NoObjectFactoryException: + except Ice.NoValueFactoryException: # Expected. pass except: @@ -530,7 +522,7 @@ def allTests(communicator): test(isinstance(o, Ice.UnknownSlicedObject)) test(o.unknownTypeId == "::Test::SUnknown") t.checkSUnknown(o) - except Ice.NoObjectFactoryException: + except Ice.NoValueFactoryException: test(t.ice_getEncodingVersion() == Ice.Encoding_1_0) except Ice.Exception: test(False) @@ -1358,7 +1350,7 @@ def allTests(communicator): t.throwBaseAsBase() test(False) except Test.BaseException as e: - test(e.ice_name() == "Test::BaseException") + test(e.ice_id() == "::Test::BaseException") test(e.sbe == "sbe") test(e.pb) test(e.pb.sb == "sb") @@ -1380,7 +1372,7 @@ def allTests(communicator): t.throwDerivedAsBase() test(False) except Test.DerivedException as e: - test(e.ice_name() == "Test::DerivedException") + test(e.ice_id() == "::Test::DerivedException") test(e.sbe == "sbe") test(e.pb) test(e.pb.sb == "sb1") @@ -1408,7 +1400,7 @@ def allTests(communicator): t.throwDerivedAsDerived() test(False) except Test.DerivedException as e: - test(e.ice_name() == "Test::DerivedException") + test(e.ice_id() == "::Test::DerivedException") test(e.sbe == "sbe") test(e.pb) test(e.pb.sb == "sb1") @@ -1436,7 +1428,7 @@ def allTests(communicator): t.throwUnknownDerivedAsBase() test(False) except Test.BaseException as e: - test(e.ice_name() == "Test::BaseException") + test(e.ice_id() == "::Test::BaseException") test(e.sbe == "sbe") test(e.pb) test(e.pb.sb == "sb d2") @@ -1579,7 +1571,7 @@ def allTests(communicator): t.ice_encodingVersion(Ice.Encoding_1_0).checkPBSUnknown(p) except Ice.OperationNotExistException: pass - + print("ok") sys.stdout.write("preserved classes (AMI)... ") @@ -1674,7 +1666,7 @@ def allTests(communicator): # UCNode. This provides an easy way to determine how many # unmarshaled instances currently exist. # - communicator.addObjectFactory(NodeFactoryI(), Test.PNode.ice_staticId()) + communicator.getValueFactoryManager().add(NodeFactoryI, Test.PNode.ice_staticId()) # # Relay a graph through the server. This test uses a preserved class @@ -1761,7 +1753,7 @@ def allTests(communicator): # Preserved. This provides an easy way to determine how many # unmarshaled instances currently exist. # - communicator.addObjectFactory(PreservedFactoryI(), Test.Preserved.ice_staticId()) + communicator.getValueFactoryManager().add(PreservedFactoryI, Test.Preserved.ice_staticId()) # # Obtain a preserved object from the server where the most-derived diff --git a/python/test/Ice/slicing/objects/run.py b/python/test/Ice/slicing/objects/run.py index 59cd2f0cce8..dffc505da7e 100755 --- a/python/test/Ice/slicing/objects/run.py +++ b/python/test/Ice/slicing/objects/run.py @@ -20,17 +20,17 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -print("Running test with sliced format.") -TestUtil.clientServerTest() +TestUtil.queueClientServerTest(configName = "sliced", message = "Running test with sliced format.") -print("Running test with 1.0 encoding.") -TestUtil.clientServerTest(additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0", message = "Running test with 1.0 encoding.", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") -print("Running test with sliced format and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py") +TestUtil.queueClientServerTest(configName = "slicedAMD", localOnly = True, + message = "Running test with sliced format and AMD server.", server="ServerAMD.py") -print("Running test with 1.0 encoding and AMD server.") -TestUtil.clientServerTest(server="ServerAMD.py", - additionalClientOptions="--Ice.Default.EncodingVersion=1.0", - additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.queueClientServerTest(configName = "1.0AMD", localOnly = True, + message = "Running test with 1.0 encoding and AMD server.", server="ServerAMD.py", + additionalClientOptions="--Ice.Default.EncodingVersion=1.0", + additionalServerOptions="--Ice.Default.EncodingVersion=1.0") +TestUtil.runQueuedTests() diff --git a/python/test/Ice/timeout/run.py b/python/test/Ice/timeout/run.py index 3fc6200cd00..8d9a8c0837c 100755 --- a/python/test/Ice/timeout/run.py +++ b/python/test/Ice/timeout/run.py @@ -20,4 +20,5 @@ if len(path) == 0: sys.path.append(os.path.join(path[0], "scripts")) import TestUtil -TestUtil.clientServerTest() +TestUtil.queueClientServerTest() +TestUtil.runQueuedTests() diff --git a/python/test/Slice/import/.depend.mak b/python/test/Slice/import/.depend.mak deleted file mode 100644 index e69de29bb2d..00000000000 --- a/python/test/Slice/import/.depend.mak +++ /dev/null |