diff options
author | Michael Verrilli <msv@pobox.com> | 2015-09-06 21:23:50 -0400 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2015-10-30 12:08:20 -0700 |
commit | ca579d1ae42fe7d41afeb5c8dfd7cfd06722b281 (patch) | |
tree | a695172bffa7f28bb2e1424d74db3e26998955f2 | |
parent | 4cebef5a2bde65027fe448461a7717b81ebb1b4a (diff) | |
download | librabbitmq-ca579d1ae42fe7d41afeb5c8dfd7cfd06722b281.tar.gz |
More data type fixes for 64-bit compatibility
This fixes the remained of issues I had for Solaris
-rw-r--r-- | Modules/_librabbitmq/connection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_librabbitmq/connection.c b/Modules/_librabbitmq/connection.c index 67d7e63..2897266 100644 --- a/Modules/_librabbitmq/connection.c +++ b/Modules/_librabbitmq/connection.c @@ -349,7 +349,7 @@ PyIter_ToAMQArray(amqp_connection_state_t conn, PyObject *src, amqp_pool_t *pool } else if (PyLong_Check(item) || PyInt_Check(item)) { /* Int | Long */ - clong_value = (int64_t)PyLong_AsLong(item); + clong_value = (int64_t)PyLong_AsLongLong(item); AMQArray_SetIntValue(&dst, clong_value); } else { @@ -732,7 +732,7 @@ amqp_basic_deliver_to_PyDict(PyObject *dest, PyObject *value = NULL; /* -- delivery_tag (PyInt) */ - value = PyLong_FROM_SSIZE_T((PY_SIZE_TYPE)delivery_tag); + value = PyLong_FromLongLong(delivery_tag); PyDICT_SETSTR_DECREF(dest, "delivery_tag", value); /* -- exchange (PyString) */ @@ -1233,8 +1233,8 @@ PyRabbitMQ_recv(PyRabbitMQ_Connection *self, PyObject *p, amqp_frame_t frame; amqp_basic_deliver_t *deliver; amqp_basic_properties_t *props; - size_t body_target; - size_t body_received; + PY_SIZE_TYPE body_target; + PY_SIZE_TYPE body_received; PyObject *channel = NULL; PyObject *consumer_tag = NULL; PyObject *delivery_info = NULL; @@ -1288,7 +1288,7 @@ PyRabbitMQ_recv(PyRabbitMQ_Connection *self, PyObject *p, } /* channel */ - channel = PyInt_FromLong((long)frame.channel); + channel = PyInt_FromLong((unsigned long)frame.channel); /* properties */ props = (amqp_basic_properties_t *)frame.payload.properties.decoded; |