char * ip_address;
if (DO_UTF8(ip_address_sv) && !sv_utf8_downgrade(ip_address_sv, 1))
croak("Wide character in Socket::inet_ntoa");
- ip_address = SvPV(ip_address_sv, addrlen);
+ ip_address = SvPVbyte(ip_address_sv, addrlen);
if (addrlen == sizeof(addr) || addrlen == 4)
addr.s_addr =
(ip_address[0] & 0xFF) << 24 |
SV * sockaddr
PREINIT:
STRLEN sockaddr_len;
- char *sockaddr_pv = SvPV(sockaddr, sockaddr_len);
+ char *sockaddr_pv = SvPVbyte(sockaddr, sockaddr_len);
CODE:
if (sockaddr_len < offsetof(struct sockaddr, sa_data)) {
croak("Bad arg length for %s, length is %d, should be at least %d",
#ifdef I_SYS_UN
struct sockaddr_un addr;
STRLEN sockaddrlen;
- char * sun_ad = SvPV(sun_sv,sockaddrlen);
+ char * sun_ad = SvPVbyte(sun_sv,sockaddrlen);
char * e;
# ifndef __linux__
/* On Linux sockaddrlen on sockets returned by accept, recvfrom,
char * ip_address;
if (DO_UTF8(ip_address_sv) && !sv_utf8_downgrade(ip_address_sv, 1))
croak("Wide character in Socket::pack_sockaddr_in");
- ip_address = SvPV(ip_address_sv, addrlen);
+ ip_address = SvPVbyte(ip_address_sv, addrlen);
if (addrlen == sizeof(addr) || addrlen == 4)
addr.s_addr =
(ip_address[0] & 0xFF) << 24 |
struct sockaddr_in addr;
unsigned short port;
struct in_addr ip_address;
- char * sin = SvPV(sin_sv,sockaddrlen);
+ char * sin = SvPVbyte(sin_sv,sockaddrlen);
if (sockaddrlen != sizeof(addr)) {
croak("Bad arg length for %s, length is %d, should be %d",
"Socket::unpack_sockaddr_in",