From: Jarkko Hietaniemi Date: Wed, 5 Sep 2001 22:52:01 +0000 (+0000) Subject: Fix a typo #11889 and add a test for the same. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2d93eb8466c122150e43d8a9356d606b88ecd04;p=p5sagit%2Fp5-mst-13.2.git Fix a typo #11889 and add a test for the same. p4raw-id: //depot/perl@11895 --- diff --git a/ext/Socket/Socket.t b/ext/Socket/Socket.t index 20a57a4..a90a6a4 100755 --- a/ext/Socket/Socket.t +++ b/ext/Socket/Socket.t @@ -13,7 +13,7 @@ BEGIN { use Socket; -print "1..13\n"; +print "1..14\n"; if (socket(T,PF_INET,SOCK_STREAM,6)) { print "ok 1\n"; @@ -101,3 +101,5 @@ print ((inet_ntoa(v10.10.10.10) eq '10.10.10.10') ? "ok 11\n" : "not ok 11\n"); print (($addr eq v10.10.10.10) ? "ok 13\n" : "not ok 13\n"); } +eval { inet_ntoa(v10.20.30.400) }; +print (($@ =~ /^Wide character in Socket::inet_ntoa at/) ? "ok 14\n" : "not ok 14\n"); diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 85541c0..b048e59 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -215,7 +215,7 @@ inet_ntoa(ip_address_sv) char * addr_str; char * ip_address; if (DO_UTF8(ip_address_sv) && !sv_utf8_downgrade(ip_address_sv, 1)) - croak("Wide character in Socket::ntoa"); + croak("Wide character in Socket::inet_ntoa"); ip_address = SvPV(ip_address_sv,addrlen); if (addrlen != sizeof(addr)) { croak("Bad arg length for %s, length is %d, should be %d",