summaryrefslogtreecommitdiff
path: root/bindings/python
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-20 10:14:21 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-20 10:14:21 +0200
commit50a8b9ea0c4a819073b46449dee8fc839b837ae5 (patch)
treea1effc887ebb0e824959b114dd0ed67e788d0507 /bindings/python
parentedecf75b611cf0e6b1c2658846cff013434edad4 (diff)
'flags' parameter added to zmq_init
Diffstat (limited to 'bindings/python')
-rw-r--r--bindings/python/pyzmq.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/bindings/python/pyzmq.cpp b/bindings/python/pyzmq.cpp
index 4bb5653..32f30fe 100644
--- a/bindings/python/pyzmq.cpp
+++ b/bindings/python/pyzmq.cpp
@@ -53,15 +53,16 @@ int context_init (context_t *self, PyObject *args, PyObject *kwdict)
{
int app_threads;
int io_threads;
- static const char *kwlist [] = {"app_threads", "io_threads", NULL};
- if (!PyArg_ParseTupleAndKeywords (args, kwdict, "ii", (char**) kwlist,
- &app_threads, &io_threads)) {
+ int flags = 0;
+ static const char *kwlist [] = {"app_threads", "io_threads", "flags", NULL};
+ if (!PyArg_ParseTupleAndKeywords (args, kwdict, "ii|i", (char**) kwlist,
+ &app_threads, &io_threads, &flags)) {
PyErr_SetString (PyExc_SystemError, "invalid arguments");
return -1;
}
assert (!self->handle);
- self->handle = zmq_init (app_threads, io_threads);
+ self->handle = zmq_init (app_threads, io_threads, flags);
if (!self->handle) {
PyErr_SetString (PyExc_SystemError, strerror (errno));
return -1;
@@ -522,7 +523,9 @@ PyMODINIT_FUNC initlibpyzmq ()
t = PyInt_FromLong (ZMQ_MCAST_LOOP);
PyDict_SetItemString (dict, "MCAST_LOOP", t);
Py_DECREF (t);
-
+ t = PyInt_FromLong (ZMQ_POLL);
+ PyDict_SetItemString (dict, "POLL", t);
+ Py_DECREF (t);
}
#if defined _MSC_VER