Sha256: 7a95c5a33413873b518faf6a0b871e233124af66a3ed4eaaacf40be3a41eef79

Contents?: true

Size: 1018 Bytes

Versions: 13

Compression:

Stored size: 1018 Bytes

Contents

#ifndef RBCZMQ_POLLITEM_H
#define RBCZMQ_POLLITEM_H

typedef struct {
    VALUE socket;
    VALUE io;
    VALUE events;
    VALUE handler;
    zmq_pollitem_t *item;
} zmq_pollitem_wrapper;

#define ZmqAssertPollitem(obj) ZmqAssertType(obj, rb_cZmqPollitem, "ZMQ::Pollitem")
#define ZmqGetPollitem(obj) \
    zmq_pollitem_wrapper *pollitem = NULL; \
    ZmqAssertPollitem(obj); \
    Data_Get_Struct(obj, zmq_pollitem_wrapper, pollitem); \
    if (!pollitem) rb_raise(rb_eTypeError, "uninitialized ZMQ pollitem!");

#define ZmqAssertHandler(obj, pollitem, handler, callback) \
    if (!rb_respond_to(handler, (callback))) \
        rb_raise(rb_eZmqError, "Pollable entity %s's handler %s expected to implement an %s callback!", RSTRING_PTR(rb_obj_as_string(rb_czmq_pollitem_pollable((obj)))), rb_obj_classname(handler), rb_id2name((callback)));

VALUE rb_czmq_pollitem_coerce(VALUE pollable);
VALUE rb_czmq_pollitem_pollable(VALUE obj);
VALUE rb_czmq_pollitem_events(VALUE obj);

void _init_rb_czmq_pollitem();

#endif

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rbczmq-1.7.9 ext/rbczmq/pollitem.h
rbczmq-1.7.8 ext/rbczmq/pollitem.h
rbczmq-1.7.7 ext/rbczmq/pollitem.h
rbczmq-1.7.6 ext/rbczmq/pollitem.h
rbczmq-1.7.5 ext/rbczmq/pollitem.h
rbczmq-1.7.4 ext/rbczmq/pollitem.h
rbczmq-1.7.3 ext/rbczmq/pollitem.h
rbczmq-1.7.2 ext/rbczmq/pollitem.h
rbczmq-1.7.1 ext/rbczmq/pollitem.h
rbczmq-1.7.0 ext/rbczmq/pollitem.h
rbczmq-1.6.4 ext/rbczmq/pollitem.h
rbczmq-1.6.2 ext/rbczmq/pollitem.h
rbczmq-1.6 ext/rbczmq/pollitem.h