[zeromq-dev] [PATCH] Re: c++ api issues
Burak Arslan
burak.arslan at arskom.com.tr
Thu Oct 21 11:51:29 CEST 2010
On 10/20/10 15:09, Martin Sustrik wrote:
>
>> as for other points, should i file issues? are they already done? in
>> which release are they going to be?
>
> Feel free to submit a patch. It won't break anything so I'll just
> apply it straight away.
>
hello martin,
as zeromq api mangles objects for memory management purposes, the
introduction of the const keyword where it seems appropriate is not
really possible.
there are two patches here, the first is for .gitignore to ignore
netbeans cruft.
best,
burak
>From 385becf717d065b841429fe20ef4d13c5f982e82 Mon Sep 17 00:00:00 2001
From: Burak Arslan <burak-github at arskom.com.tr>
Date: Thu, 21 Oct 2010 12:42:58 +0300
Subject: [PATCH 1/2] ignore netbeans cruft
---
.gitignore | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index 23e2fdd..d44ee27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,5 @@ foreign/openpgm/*
!foreign/openpgm/*.tar.gz
zeromq-*.tar.gz
zeromq-*.zip
+nbproject
+Makefile-*.mk
\ No newline at end of file
--
1.7.2.2
>From 3924322755a8f9b09b15e42a44fbd5ac6cde3c5f Mon Sep 17 00:00:00 2001
From: Burak Arslan <burak-github at arskom.com.tr>
Date: Thu, 21 Oct 2010 12:44:12 +0300
Subject: [PATCH 2/2] const-corrected zmq::message_t::size call.
---
include/zmq.h | 2 +-
include/zmq.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/zmq.h b/include/zmq.h
index 1cb6c03..275f801 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -149,7 +149,7 @@ 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 size_t zmq_msg_size (const zmq_msg_t *msg);
/******************************************************************************/
/* 0MQ infrastructure (a.k.a. context) initialisation &
termination. */
diff --git a/include/zmq.hpp b/include/zmq.hpp
index 86ffff6..9ec72e5 100644
--- a/include/zmq.hpp
+++ b/include/zmq.hpp
@@ -148,7 +148,7 @@ namespace zmq
return zmq_msg_data (this);
}
- inline size_t size ()
+ inline size_t size () const
{
return zmq_msg_size (this);
}
--
1.7.2.2
More information about the zeromq-dev
mailing list