diff options
Diffstat (limited to 'Modules/_librabbitmq/connection.h')
-rw-r--r-- | Modules/_librabbitmq/connection.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Modules/_librabbitmq/connection.h b/Modules/_librabbitmq/connection.h index 273ae75..c7e52e4 100644 --- a/Modules/_librabbitmq/connection.h +++ b/Modules/_librabbitmq/connection.h @@ -19,7 +19,7 @@ #else #define PYRABBITMQ_MOD_INIT(name) PyMODINIT_FUNC init##name(void) #endif - + #if PY_VERSION_HEX >= 0x03000000 /* 3.0 and up */ # define BUILD_METHOD_NAME PyUnicode_FromString @@ -172,9 +172,20 @@ typedef struct { PyObject *weakreflist; } PyRabbitMQ_Connection; +// Keep track of PyObject references with increased reference count. +// Entries are stored in the channel pool. +#define PYOBJECT_POOL_MAX 100 +typedef struct pyobject_pool_t_ { + int num_entries; + PyObject **entries; + amqp_pool_t *pool; + struct pyobject_pool_t_ *next; +} pyobject_pool_t; + int PyDict_to_basic_properties(PyObject *, amqp_basic_properties_t *, - amqp_connection_state_t, amqp_pool_t *); + amqp_connection_state_t, amqp_pool_t *, + pyobject_pool_t *); /* Connection method sigs */ static PyRabbitMQ_Connection* |