diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-01-05 18:44:54 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-01-05 18:44:54 +0000 |
commit | f6e5f4fa31eb7ca5ae0c6301b579da2752606950 (patch) | |
tree | 6198903725faacfb92fa6758a3b65a9812ff41ab /py/modules/IcePy/ObjectAdapter.cpp | |
parent | fix header file symlink target location for db45 (diff) | |
download | ice-f6e5f4fa31eb7ca5ae0c6301b579da2752606950.tar.bz2 ice-f6e5f4fa31eb7ca5ae0c6301b579da2752606950.tar.xz ice-f6e5f4fa31eb7ca5ae0c6301b579da2752606950.zip |
Added ObjectAdapter::destroy
Diffstat (limited to 'py/modules/IcePy/ObjectAdapter.cpp')
-rw-r--r-- | py/modules/IcePy/ObjectAdapter.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/py/modules/IcePy/ObjectAdapter.cpp b/py/modules/IcePy/ObjectAdapter.cpp index 7281e55dbf6..5f244cdd46a 100644 --- a/py/modules/IcePy/ObjectAdapter.cpp +++ b/py/modules/IcePy/ObjectAdapter.cpp @@ -639,6 +639,28 @@ adapterWaitForDeactivate(ObjectAdapterObject* self, PyObject* args) extern "C" #endif static PyObject* +adapterDestroy(ObjectAdapterObject* self) +{ + assert(self->adapter); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking calls. + (*self->adapter)->destroy(); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return NULL; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* adapterAdd(ObjectAdapterObject* self, PyObject* args) { PyObject* objectType = lookupType("Ice.Object"); @@ -1348,6 +1370,8 @@ static PyMethodDef AdapterMethods[] = PyDoc_STR(STRCAST("deactivate() -> None")) }, { STRCAST("waitForDeactivate"), (PyCFunction)adapterWaitForDeactivate, METH_VARARGS, PyDoc_STR(STRCAST("waitForDeactivate() -> None")) }, + { STRCAST("destroy"), (PyCFunction)adapterDestroy, METH_NOARGS, + PyDoc_STR(STRCAST("destroy() -> None")) }, { STRCAST("add"), (PyCFunction)adapterAdd, METH_VARARGS, PyDoc_STR(STRCAST("add(servant, identity) -> Ice.ObjectPrx")) }, { STRCAST("addFacet"), (PyCFunction)adapterAddFacet, METH_VARARGS, |