summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-09-05 22:52:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-05 22:52:01 +0000
commitb2d93eb8466c122150e43d8a9356d606b88ecd04 (patch)
treefc6020680d9200cfc2c2bb0efbfea757956674a5 /ext
parent765ebaf25db8c75bb3c9aa615725c4ab6cf615ec (diff)
downloadperl-b2d93eb8466c122150e43d8a9356d606b88ecd04.tar.gz
Fix a typo #11889 and add a test for the same.
p4raw-id: //depot/perl@11895
Diffstat (limited to 'ext')
-rwxr-xr-xext/Socket/Socket.t4
-rw-r--r--ext/Socket/Socket.xs2
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/Socket/Socket.t b/ext/Socket/Socket.t
index 20a57a49b7..a90a6a4db1 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 85541c0d74..b048e59d62 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",