[zeromq-dev] Request for a slight change of zmq_msg_t typedef

Pieter Hintjens ph at imatix.com
Fri Sep 21 06:09:29 CEST 2012

On Thu, Sep 20, 2012 at 10:17 PM, Chernyshev Vyacheslav <astellar at ro.ru> wrote:

> Currently zmq_msg_t is a typedef of anonymous struct. It creates very
> annoying difficulties when application's API just needs a forward
> declaration, as there is no way to forward declare something that does
> not have a name.

Not quite sure what your use case is, could you paste some sample code?

I'd probably _not_ provide zmq_msg_t to higher level APIs at all. It's
very low level and semantically vague. Is it a frame, a message? You
can't even process multi-part data if you handle only zmq_msg_t's.

> Can it be changed to something like:
>      typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t;

Applications will (I guarantee it) start to use that _ property
directly and break future changes to the implementation.


More information about the zeromq-dev mailing list