Changed return type of zmq_msg_size to ssize_t to allow error return

This commit is contained in:
Pieter Hintjens 2012-02-15 15:17:01 -06:00
parent dc09da4569
commit 02b81d42ce
2 changed files with 3 additions and 3 deletions

View File

@ -167,14 +167,14 @@ ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);
ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);
ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg);
ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg);
ZMQ_EXPORT ssize_t zmq_msg_size (zmq_msg_t *msg);
ZMQ_EXPORT int zmq_msg_more (zmq_msg_t *msg);
ZMQ_EXPORT int zmq_msg_get (zmq_msg_t *msg, int option, void *optval,
size_t *optvallen);
ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, const void *optval,
size_t *optvallen);
/******************************************************************************/
/* 0MQ infrastructure (a.k.a. context) initialisation & termination. */
/******************************************************************************/

View File

@ -576,7 +576,7 @@ void *zmq_msg_data (zmq_msg_t *msg_)
return ((zmq::msg_t*) msg_)->data ();
}
size_t zmq_msg_size (zmq_msg_t *msg_)
ssize_t zmq_msg_size (zmq_msg_t *msg_)
{
if (!msg_) {
errno = EFAULT;