diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-06-04 16:32:30 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-06-04 16:32:30 +0000 |
commit | fb44a6a45b1ca26399b5d64c5189650810d7019d (patch) | |
tree | 12d073982387544c74a5974ecf6b3a31741a6b9a /py/modules/IcePy/ObjectAdapter.cpp | |
parent | Fixed typo (diff) | |
download | ice-fb44a6a45b1ca26399b5d64c5189650810d7019d.tar.bz2 ice-fb44a6a45b1ca26399b5d64c5189650810d7019d.tar.xz ice-fb44a6a45b1ca26399b5d64c5189650810d7019d.zip |
Added refreshPublishedEndpoints
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 37fb4e2b7e8..8fb5c743b11 100644 --- a/py/modules/IcePy/ObjectAdapter.cpp +++ b/py/modules/IcePy/ObjectAdapter.cpp @@ -1376,6 +1376,28 @@ adapterSetLocator(ObjectAdapterObject* self, PyObject* args) return Py_None; } +#ifdef WIN32 +extern "C" +#endif +static PyObject* +adapterRefreshPublishedEndpoints(ObjectAdapterObject* self) +{ + assert(self->adapter); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking calls. + (*self->adapter)->refreshPublishedEndpoints(); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + static PyMethodDef AdapterMethods[] = { { STRCAST("getName"), reinterpret_cast<PyCFunction>(adapterGetName), METH_NOARGS, @@ -1432,6 +1454,8 @@ static PyMethodDef AdapterMethods[] = PyDoc_STR(STRCAST("createReverseProxy(identity) -> Ice.ObjectPrx")) }, { STRCAST("setLocator"), reinterpret_cast<PyCFunction>(adapterSetLocator), METH_VARARGS, PyDoc_STR(STRCAST("setLocator(proxy) -> None")) }, + { STRCAST("refreshPublishedEndpoints"), reinterpret_cast<PyCFunction>(adapterRefreshPublishedEndpoints), METH_NOARGS, + PyDoc_STR(STRCAST("refreshPublishedEndpoints() -> None")) }, { 0, 0 } /* sentinel */ }; |