Message30841
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 |
|
Date |
User |
Action |
Args |
2007-08-23 14:50:48 | admin | link | issue1619659 messages |
2007-08-23 14:50:48 | admin | create | |
|