Message196462
> For Windows >= Vista, inet_pton() is available.
> I'm not sure whether XP has one of them: if not, then we might keep
> the hand-parsing as a fallback.
Apparently, XP doesn't have inet_aton()...
So I changed the code to use inet_pton() if available, otherwise use inet_addr(), which is available everywhere (the only gotcha is that it doesn't handle "255.255.255.255", so we special-case it like "<broadcast>").
We thus get rid of the hand-parsing completely, and get a more efficient handling of numeric IPv4 addresses, and a much more efficient handling for numeric IPv6 addresses (see above benchmarks). |
|
Date |
User |
Action |
Args |
2013-08-29 15:30:38 | neologix | set | recipients:
+ neologix, pitrou, vstinner, ezio.melotti, santoso.wijaya, maker |
2013-08-29 15:30:38 | neologix | set | messageid: <1377790238.08.0.750442196424.issue16201@psf.upfronthosting.co.za> |
2013-08-29 15:30:38 | neologix | link | issue16201 messages |
2013-08-29 15:30:38 | neologix | create | |
|