summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-09 23:45:59 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-09 23:45:59 +0000
commit056ccc885f3d3d445b10a8e5cd6e41ee2f09cfcc (patch)
treec32b1d3a114e8846b5ac02b81bf60f29a6a25ab2
parentclean up; adding more operations (diff)
downloadice-056ccc885f3d3d445b10a8e5cd6e41ee2f09cfcc.tar.bz2
ice-056ccc885f3d3d445b10a8e5cd6e41ee2f09cfcc.tar.xz
ice-056ccc885f3d3d445b10a8e5cd6e41ee2f09cfcc.zip
Operation changes
-rw-r--r--py/modules/IcePy/Proxy.cpp31
-rw-r--r--py/modules/IcePy/Proxy.h1
2 files changed, 10 insertions, 22 deletions
diff --git a/py/modules/IcePy/Proxy.cpp b/py/modules/IcePy/Proxy.cpp
index 1a8574b8085..b3b18ef3955 100644
--- a/py/modules/IcePy/Proxy.cpp
+++ b/py/modules/IcePy/Proxy.cpp
@@ -9,7 +9,7 @@
#include <Proxy.h>
#include <structmember.h>
-#include <Operation.h>
+//#include <Operation.h>
#include <Util.h>
#include <Ice/LocalException.h>
#include <Ice/Proxy.h>
@@ -750,25 +750,6 @@ proxyIceDefault(ProxyObject* self)
return createProxy(newProxy, *self->communicator);
}
-#ifdef WIN32
-extern "C"
-#endif
-static PyObject*
-proxyIceOperation(ProxyObject* self, PyObject* args)
-{
- char* name;
- char* type;
- PyObject* opArgs;
- if(!PyArg_ParseTuple(args, "ssO!", &name, &type, &PyTuple_Type, &opArgs))
- {
- return NULL;
- }
-
- OperationPtr op = getOperation(type, name);
- assert(op);
- return op->invoke(*self->proxy, *self->communicator, opArgs);
-}
-
static PyObject*
checkedCastImpl(ProxyObject* p, const string& id, const string& facet, PyObject* type)
{
@@ -984,8 +965,6 @@ static PyMethodDef ProxyMethods[] =
PyDoc_STR("ice_timeout(int) -> Ice.ObjectPrx") },
{ "ice_default", (PyCFunction)proxyIceDefault, METH_NOARGS,
PyDoc_STR("ice_default() -> Ice.ObjectPrx") },
- { "ice_operation", (PyCFunction)proxyIceOperation, METH_VARARGS,
- PyDoc_STR("ice_operation(inargs[, ctx]) -> (result, outargs ...)") },
{ "ice_checkedCast", (PyCFunction)proxyIceCheckedCast, METH_VARARGS | METH_CLASS,
PyDoc_STR("ice_checkedCast(proxy, id) -> proxy") },
{ "ice_uncheckedCast", (PyCFunction)proxyIceUncheckedCast, METH_VARARGS | METH_CLASS,
@@ -1088,3 +1067,11 @@ IcePy::getProxy(PyObject* p)
ProxyObject* obj = (ProxyObject*)p;
return *obj->proxy;
}
+
+Ice::CommunicatorPtr
+IcePy::getProxyCommunicator(PyObject* p)
+{
+ assert(checkProxy(p));
+ ProxyObject* obj = (ProxyObject*)p;
+ return *obj->communicator;
+}
diff --git a/py/modules/IcePy/Proxy.h b/py/modules/IcePy/Proxy.h
index 0906e24c56b..dc57049e2eb 100644
--- a/py/modules/IcePy/Proxy.h
+++ b/py/modules/IcePy/Proxy.h
@@ -26,6 +26,7 @@ PyObject* createProxy(const Ice::ObjectPrx&, const Ice::CommunicatorPtr&, PyObje
bool checkProxy(PyObject*);
Ice::ObjectPrx getProxy(PyObject*);
+Ice::CommunicatorPtr getProxyCommunicator(PyObject*);
}