Change 11895 by jhi@alpha on 2001/09/05 22:52:01

        Fix a typo #11889 and add a test for the same.

Affected files ...

... //depot/perl/ext/Socket/Socket.t#4 edit
... //depot/perl/ext/Socket/Socket.xs#40 edit

Differences ...

==== //depot/perl/ext/Socket/Socket.t#4 (xtext) ====
Index: perl/ext/Socket/Socket.t
--- perl/ext/Socket/Socket.t.~1~        Wed Sep  5 17:00:07 2001
+++ perl/ext/Socket/Socket.t    Wed Sep  5 17:00:07 2001
@@ -13,7 +13,7 @@
        
 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 (($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");

==== //depot/perl/ext/Socket/Socket.xs#40 (text) ====
Index: perl/ext/Socket/Socket.xs
--- perl/ext/Socket/Socket.xs.~1~       Wed Sep  5 17:00:07 2001
+++ perl/ext/Socket/Socket.xs   Wed Sep  5 17:00:07 2001
@@ -215,7 +215,7 @@
        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",
End of Patch.

Reply via email to