Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

zmq[23]_getsockopt_string() is broken + some typos for Socket.pm #2

Merged
merged 2 commits into from

2 participants

@shripchenko
  • passing char** instead of void*
  • calling ZMQ::cal() instead of ZMQ::call()
@shripchenko

it doesnt look like this code in Socket.pm is workable:

            sub recv {
                my $self = shift;
                my $msg  = shift;
                if ( ref $msg && eval { $msg->isa( 'ZMQ::Message' ) } ) {
                    $msg = $msg->{_msg};
                }
                ZMQ::call( "zmq_recv", $msg, @_ );
            }
            sub send {
                my $self = shift;
                my $msg  = shift;
                if ( ref $msg && eval { $msg->isa( 'ZMQ::Message' ) } ) {
                    $msg = $msg->{_msg};
                }
                ZMQ::call( "zmq_send", $msg, @_ );
            }
@lestrrat lestrrat merged commit 3a078f8 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 19, 2012
  1. @shripchenko
  2. @shripchenko

    ^) I enlarged your ::cal

    shripchenko authored
This page is out of date. Refresh to see the latest.
View
2  ZMQ-LibZMQ2/xs/perl_libzmq2.xs
@@ -83,7 +83,7 @@ PerlLibzmq2_zmq_getsockopt_string(PerlLibzmq2_Socket *sock, int option, size_t l
SV *sv;
Newxz(string, len, char);
- status = zmq_getsockopt(sock->socket, option, &string, &len);
+ status = zmq_getsockopt(sock->socket, option, string, &len);
if(status == 0) {
sv = newSVpvn(string, len);
} else {
View
2  ZMQ-LibZMQ3/xs/perl_libzmq3.xs
@@ -83,7 +83,7 @@ PerlLibzmq3_zmq_getsockopt_string(PerlLibzmq3_Socket *sock, int option, size_t l
SV *sv;
Newxz(string, len, char);
- status = zmq_getsockopt(sock->socket, option, &string, &len);
+ status = zmq_getsockopt(sock->socket, option, string, &len);
if(status == 0) {
sv = newSVpvn(string, len);
} else {
View
4 ZMQ/lib/ZMQ/Socket.pm
@@ -84,7 +84,7 @@ EOM
if ( ref $msg && eval { $msg->isa( 'ZMQ::Message' ) } ) {
$msg = $msg->{_msg};
}
- ZMQ::cal( "zmq_recv", $msg, @_ );
+ ZMQ::call( "zmq_recv", $msg, @_ );
}
sub send {
my $self = shift;
@@ -92,7 +92,7 @@ EOM
if ( ref $msg && eval { $msg->isa( 'ZMQ::Message' ) } ) {
$msg = $msg->{_msg};
}
- ZMQ::cal( "zmq_send", $msg, @_ );
+ ZMQ::call( "zmq_send", $msg, @_ );
}
EOM
die if $@;
Something went wrong with that request. Please try again.