diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-02-17 21:42:15 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-02-17 21:42:15 +0000 |
commit | de8f351d9b962c18f275bcdbe91eba410d3ee056 (patch) | |
tree | 347f55ec9c24ac1cc3704436ab214f4cf0ef5db2 /py/modules/IcePy/Connection.cpp | |
parent | adding binding test (diff) | |
download | ice-de8f351d9b962c18f275bcdbe91eba410d3ee056.tar.bz2 ice-de8f351d9b962c18f275bcdbe91eba410d3ee056.tar.xz ice-de8f351d9b962c18f275bcdbe91eba410d3ee056.zip |
porting new proxy methods for connection mgmt
Diffstat (limited to 'py/modules/IcePy/Connection.cpp')
-rw-r--r-- | py/modules/IcePy/Connection.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/py/modules/IcePy/Connection.cpp b/py/modules/IcePy/Connection.cpp index b95f1bb1e7d..b8dcc0fa93d 100644 --- a/py/modules/IcePy/Connection.cpp +++ b/py/modules/IcePy/Connection.cpp @@ -63,6 +63,26 @@ connectionDealloc(ConnectionObject* self) #ifdef WIN32 extern "C" #endif +static int +connectionCompare(ConnectionObject* c1, ConnectionObject* c2) +{ + if(*c1->connection < *c2->connection) + { + return -1; + } + else if(*c1->connection == *c2->connection) + { + return 0; + } + else + { + return 1; + } +} + +#ifdef WIN32 +extern "C" +#endif static PyObject* connectionClose(ConnectionObject* self, PyObject* args) { @@ -299,7 +319,7 @@ PyTypeObject ConnectionType = 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ - 0, /* tp_compare */ + (cmpfunc)connectionCompare, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ |