Commit 33419425 authored by Joe Eli McIlvain's avatar Joe Eli McIlvain

Problem: Private/internal macros defined in public header.

Solution: Move the macros to a private header.
parent 735c02ed
...@@ -511,19 +511,6 @@ ZMQ_EXPORT void *zmq_threadstart (zmq_thread_fn* func, void* arg); ...@@ -511,19 +511,6 @@ ZMQ_EXPORT void *zmq_threadstart (zmq_thread_fn* func, void* arg);
ZMQ_EXPORT void zmq_threadclose (void* thread); ZMQ_EXPORT void zmq_threadclose (void* thread);
/******************************************************************************/
/* 0MQ Internal Use */
/******************************************************************************/
#define LIBZMQ_UNUSED(object) (void)object
#define LIBZMQ_DELETE(p_object) {\
delete p_object; \
p_object = 0; \
}
/******************************************************************************/
#undef ZMQ_EXPORT #undef ZMQ_EXPORT
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#include "address.hpp" #include "address.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "client.hpp" #include "client.hpp"
#include "err.hpp" #include "err.hpp"
#include "msg.hpp" #include "msg.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#ifdef ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp" #include "windows.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "dealer.hpp" #include "dealer.hpp"
#include "err.hpp" #include "err.hpp"
#include "msg.hpp" #include "msg.hpp"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <algorithm> #include <algorithm>
#include <new> #include <new>
#include "macros.hpp"
#include "epoll.hpp" #include "epoll.hpp"
#include "err.hpp" #include "err.hpp"
#include "config.hpp" #include "config.hpp"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <new> #include <new>
#include "macros.hpp"
#include "io_thread.hpp" #include "io_thread.hpp"
#include "platform.hpp" #include "platform.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <algorithm> #include <algorithm>
#include <new> #include <new>
#include "macros.hpp"
#include "kqueue.hpp" #include "kqueue.hpp"
#include "err.hpp" #include "err.hpp"
#include "config.hpp" #include "config.hpp"
......
/******************************************************************************/
/* 0MQ Internal Use */
/******************************************************************************/
#define LIBZMQ_UNUSED(object) (void)object
#define LIBZMQ_DELETE(p_object) {\
delete p_object; \
p_object = 0; \
}
/******************************************************************************/
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "msg.hpp" #include "msg.hpp"
#include "../include/zmq.h" #include "../include/zmq.h"
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <new> #include <new>
#include <algorithm> #include <algorithm>
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp" #include "windows.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "pair.hpp" #include "pair.hpp"
#include "err.hpp" #include "err.hpp"
#include "pipe.hpp" #include "pipe.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#if defined ZMQ_HAVE_OPENPGM #if defined ZMQ_HAVE_OPENPGM
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <new> #include <new>
#include <stddef.h> #include <stddef.h>
#include "macros.hpp"
#include "pipe.hpp" #include "pipe.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "pull.hpp" #include "pull.hpp"
#include "err.hpp" #include "err.hpp"
#include "msg.hpp" #include "msg.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "push.hpp" #include "push.hpp"
#include "pipe.hpp" #include "pipe.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "reaper.hpp" #include "reaper.hpp"
#include "socket_base.hpp" #include "socket_base.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "router.hpp" #include "router.hpp"
#include "pipe.hpp" #include "pipe.hpp"
#include "wire.hpp" #include "wire.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "server.hpp" #include "server.hpp"
#include "pipe.hpp" #include "pipe.hpp"
#include "wire.hpp" #include "wire.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "i_engine.hpp" #include "i_engine.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <new> #include <new>
#include <string> #include <string>
#include "macros.hpp"
#include "socks_connecter.hpp" #include "socks_connecter.hpp"
#include "stream_engine.hpp" #include "stream_engine.hpp"
#include "platform.hpp" #include "platform.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "stream.hpp" #include "stream.hpp"
#include "pipe.hpp" #include "pipe.hpp"
#include "wire.hpp" #include "wire.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp" #include "windows.hpp"
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "ip.hpp" #include "ip.hpp"
#include "tcp.hpp" #include "tcp.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
#include "macros.hpp"
#include "tcp_address.hpp" #include "tcp_address.hpp"
#include "platform.hpp" #include "platform.hpp"
#include "stdint.hpp" #include "stdint.hpp"
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <new> #include <new>
#include <string> #include <string>
#include "macros.hpp"
#include "tcp_connecter.hpp" #include "tcp_connecter.hpp"
#include "stream_engine.hpp" #include "stream_engine.hpp"
#include "io_thread.hpp" #include "io_thread.hpp"
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <new> #include <new>
#include <algorithm> #include <algorithm>
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#if defined ZMQ_HAVE_WINDOWS #if defined ZMQ_HAVE_WINDOWS
#include "windows.hpp" #include "windows.hpp"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <string.h> #include <string.h>
#include "macros.hpp"
#include "xsub.hpp" #include "xsub.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
#define ZMQ_TYPE_UNSAFE #define ZMQ_TYPE_UNSAFE
#include "macros.hpp"
#include "poller.hpp" #include "poller.hpp"
// On AIX platform, poll.h has to be included first to get consistent // On AIX platform, poll.h has to be included first to get consistent
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "macros.hpp"
#include "platform.hpp" #include "platform.hpp"
#include "clock.hpp" #include "clock.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment