summaryrefslogtreecommitdiff
path: root/bindings/ruby
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-22 13:00:05 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-22 13:00:05 +0200
commit3bd8f83f6d412221e4673ceb90b8ca7fa74ff2f1 (patch)
treef05b41eb05148157558ab858ef196f052af64700 /bindings/ruby
parenta0db7f6b811e687eda452a7de9f5db112f715544 (diff)
language bindings use zmq_strerror instead of strerror
Diffstat (limited to 'bindings/ruby')
-rw-r--r--bindings/ruby/rbzmq.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/bindings/ruby/rbzmq.cpp b/bindings/ruby/rbzmq.cpp
index 83bb2b6..6112972 100644
--- a/bindings/ruby/rbzmq.cpp
+++ b/bindings/ruby/rbzmq.cpp
@@ -44,7 +44,7 @@ static VALUE context_initialize (VALUE self_, VALUE app_threads_,
void *ctx = zmq_init (NUM2INT (app_threads_), NUM2INT (io_threads_),
NUM2INT (flags_));
if (!ctx) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -76,7 +76,7 @@ static VALUE socket_initialize (VALUE self_, VALUE context_, VALUE type_)
void *s = zmq_socket (DATA_PTR (context_), NUM2INT (type_));
if (!s) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -123,7 +123,7 @@ static VALUE socket_setsockopt (VALUE self_, VALUE option_,
}
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -137,7 +137,7 @@ static VALUE socket_bind (VALUE self_, VALUE addr_)
int rc = zmq_bind (DATA_PTR (self_), rb_string_value_cstr (&addr_));
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -150,7 +150,7 @@ static VALUE socket_connect (VALUE self_, VALUE addr_)
int rc = zmq_connect (DATA_PTR (self_), rb_string_value_cstr (&addr_));
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -166,7 +166,7 @@ static VALUE socket_send (VALUE self_, VALUE msg_, VALUE flags_)
zmq_msg_t msg;
int rc = zmq_msg_init_size (&msg, RSTRING_LEN (msg_));
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
memcpy (zmq_msg_data (&msg), RSTRING_PTR (msg_), RSTRING_LEN (msg_));
@@ -179,7 +179,7 @@ static VALUE socket_send (VALUE self_, VALUE msg_, VALUE flags_)
}
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
rc = zmq_msg_close (&msg);
assert (rc == 0);
return Qnil;
@@ -196,7 +196,7 @@ static VALUE socket_flush (VALUE self_)
int rc = zmq_flush (DATA_PTR (self_));
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
return Qnil;
}
@@ -219,7 +219,7 @@ static VALUE socket_recv (VALUE self_, VALUE flags_)
}
if (rc != 0) {
- rb_raise (rb_eRuntimeError, strerror (errno));
+ rb_raise (rb_eRuntimeError, zmq_strerror (errno));
rc = zmq_msg_close (&msg);
assert (rc == 0);
return Qnil;