diff options
author | Thijs Terlouw <thijsterlouw@gmail.com> | 2011-02-04 16:44:13 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-02-04 16:44:13 +0100 |
commit | 042e34a5d99a9d39b0680d063878f13f5d7e7337 (patch) | |
tree | 7d6358b8ecd79d7c7edcb2ab4dd79720e051cc48 | |
parent | 3f758ab2f45a07e3e77af4f1b32dc876f5a151ad (diff) |
operator void* () added to context_t.
Makes it possible to share the context from C++ to C.
Signed-off-by: Thijs Terlouw <thijsterlouw@gmail.com>
-rw-r--r-- | include/zmq.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
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; |