From 042e34a5d99a9d39b0680d063878f13f5d7e7337 Mon Sep 17 00:00:00 2001 From: Thijs Terlouw Date: Fri, 4 Feb 2011 16:44:13 +0100 Subject: operator void* () added to context_t. Makes it possible to share the context from C++ to C. Signed-off-by: Thijs Terlouw --- include/zmq.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/zmq.hpp b/include/zmq.hpp index 4cfa399..e22057d 100644 --- a/include/zmq.hpp +++ b/include/zmq.hpp @@ -184,6 +184,14 @@ namespace zmq assert (rc == 0); } + // Be careful with this, it's probably only useful for + // using the C api together with an existing C++ api. + // Normally you should never need to use this. + inline operator void* () + { + return ptr; + } + private: void *ptr; -- cgit v1.2.3