New submission from Maarten Thibaut:
Socket library functions such as ntohs() return uint16_t, but inside
Python these return values show up as negative numbers. One possible fix
is to convert these return values using pack:
struct.unpack('H', struct.pack('h', ntohs(number)))[0] & 0xffff
----------
components: Library (Lib)
messages: 59047
nosy: mthibaut
severity: normal
status: open
title: socket functions that should return unsigned int return signed int
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1711>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com