[Patches] [ python-Patches-1635058 ] htonl et al accept negative ints
SourceForge.net
noreply at sourceforge.net
Mon Jan 15 01:02:49 CET 2007
Patches item #1635058, was opened at 2007-01-14 02:35
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1635058&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.6
Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Mark Roberts (mark-roberts)
Assigned to: Nobody/Anonymous (nobody)
Summary: htonl et al accept negative ints
Initial Comment:
Referencing bug 1619659
This patch ensures that htonl and friends never accept or return negative numbers, per the underlying C implementation.
I wrote a test case to ensure things work as expected, and ensured all tests pass.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2007-01-14 19:02
Message:
Logged In: YES
user_id=6380
Originator: NO
Thanks, applied!
----------------------------------------------------------------------
Comment By: Mark Roberts (mark-roberts)
Date: 2007-01-14 17:24
Message:
Logged In: YES
user_id=1591633
Originator: YES
Hmm, I'll remember consistency when working with the C implementation.
The Python that I've looked at seems to always use 4 spaces. At any rate,
here's a doc patch. It essentially just makes "n bit integers" read "n bit
positive integers". Other than that, I can think of no way to update the
docs to reflect the scope of this patch.
Thanks for everything, Guido!
File Added: bug_g119659_doc.patch
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2007-01-14 12:04
Message:
Logged In: YES
user_id=6380
Originator: NO
Thanks, submitted.
(Note that I had to fix the indentation in your patch; you used four
spaces where the original code used tabs. Please be consistent!)
Can you check if there's a need to update the docs? If there is, send me
a doc patch and I'll apply it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1635058&group_id=5470
More information about the Patches
mailing list