Sha256: 7ca90a5d5f89f90cb23e93757dcf33113ce0d5c1cf28fcd9e90092446388b1e8

Contents?: true

Size: 776 Bytes

Versions: 18

Compression:

Stored size: 776 Bytes

Contents

#ifndef RBCZMQ_MESSAGE_H
#define RBCZMQ_MESSAGE_H

#define ZMQ_MESSAGE_DESTROYED 0x01

typedef struct {
    zmsg_t  *message;
    int flags;
} zmq_message_wrapper;

#define ZmqAssertMessage(obj) ZmqAssertType(obj, rb_cZmqMessage, "ZMQ::Message")
#define ZmqGetMessage(obj) \
    zmq_message_wrapper *message = NULL; \
    ZmqAssertMessage(obj); \
    Data_Get_Struct(obj, zmq_message_wrapper, message); \
    if (!message) rb_raise(rb_eTypeError, "uninitialized ZMQ message!"); \
    if (message->flags & ZMQ_MESSAGE_DESTROYED) rb_raise(rb_eZmqError, "ZMQ::Message instance %p has been destroyed by the ZMQ framework", (void *)obj);

VALUE rb_czmq_alloc_message(zmsg_t *message);
void rb_czmq_free_message(zmq_message_wrapper *message);

void _init_rb_czmq_message();

#endif

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rbczmq-1.6.4 ext/rbczmq/message.h
rbczmq-1.6.2 ext/rbczmq/message.h
rbczmq-1.6 ext/rbczmq/message.h
rbczmq-1.5 ext/rbczmq/message.h
rbczmq-1.4 ext/rbczmq/message.h
rbczmq-1.3 ext/rbczmq/message.h
rbczmq-1.2 ext/rbczmq/message.h
rbczmq-1.1 ext/rbczmq/message.h
rbczmq-1.0 ext/rbczmq/message.h
rbczmq-0.9 ext/rbczmq/message.h
rbczmq-0.8 ext/rbczmq/message.h
rbczmq-0.7 ext/rbczmq/message.h
rbczmq-0.6 ext/rbczmq/message.h
rbczmq-0.5 ext/rbczmq/message.h
rbczmq-0.4 ext/rbczmq/message.h
rbczmq-0.3 ext/rbczmq/message.h
rbczmq-0.2 ext/rbczmq/message.h
rbczmq-0.1 ext/rbczmq/message.h