This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark-roberts
Recipients
Date 2006-12-26.09:24:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
From man page for htonl and friends:
       #include <arpa/inet.h>
       uint32_t htonl(uint32_t hostlong);
       uint16_t htons(uint16_t hostshort);
       uint32_t ntohl(uint32_t netlong);
       uint16_t ntohs(uint16_t netshort);

Python does call these underlying functions in Modules/socketmodule.c.  The problem comes from that PyLong_AsUnsignedLong() called in socket_htonl() specifically checks to see that the value cannot be less than 0.  The error checking was rather exquisite, I might add.

- Mark
History
Date User Action Args
2007-08-23 14:50:48adminlinkissue1619659 messages
2007-08-23 14:50:48admincreate