cpython/Include
Gregory P. Smith c2176e46d7 Fix the internals of our hash functions to used unsigned values during hash
computation as the overflow behavior of signed integers is undefined.

NOTE: This change is smaller compared to 3.2 as much of this cleanup had
already been done.  I added the comment that my change in 3.2 added so that the
code would match up.  Otherwise this just adds or synchronizes appropriate UL
designations on some constants to be pedantic.

In practice we require compiling everything with -fwrapv which forces overflow
to be defined as twos compliment but this keeps the code cleaner for checkers
or in the case where someone has compiled it without -fwrapv or their
compiler's equivalent.

Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).

Cleanup only - no functionality or hash values change.
2012-12-10 18:32:53 -08:00
..
Python-ast.h make YieldFrom its own distinct from Yield (closes #13780) 2012-01-14 08:58:23 -05:00
Python.h Eric Snow's implementation of PEP 421. 2012-06-03 16:18:47 -04:00
abstract.h Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. 2012-07-28 12:25:55 +02:00
accu.h Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers. 2012-03-22 23:10:37 +00:00
asdl.h Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353. 2012-05-15 14:45:03 +02:00
ast.h
bitset.h
bltinmodule.h
boolobject.h
bytearrayobject.h
bytes_methods.h
bytesobject.h Simplify and optimize formatlong() 2012-04-27 23:40:13 +02:00
cellobject.h
ceval.h
classobject.h
code.h
codecs.h
compile.h
complexobject.h Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args) 2012-05-29 12:57:52 +02:00
datetime.h Issue #13727: Add 3 macros to access PyDateTime_Delta members: 2012-01-17 21:31:50 +01:00
descrobject.h Issue #13577: various kinds of descriptors now have a __qualname__ attribute. 2011-12-12 13:47:25 +01:00
dictobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
dtoa.h Issue #14521: Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). 2012-04-29 15:31:56 +01:00
dynamic_annotations.h
enumobject.h
errcode.h Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00
eval.h
fileobject.h
fileutils.h Issue #14153 Create _Py_device_encoding() to prevent _io from having to import 2012-02-29 18:31:31 -05:00
floatobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
frameobject.h Update comment: SAVE_EXC_STATE and SWAP_EXC_STATE macroses are saave_exc_state and swap_exc_state functions now. 2012-12-05 17:59:10 +02:00
funcobject.h
genobject.h Issue #13783: the PEP 380 implementation no longer expands the public C API 2012-06-17 15:15:49 +10:00
graminit.h Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
grammar.h
import.h Issue #15610: The PyImport_ImportModuleEx macro now calls 2012-08-10 18:55:08 -04:00
intrcheck.h
iterobject.h Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI. 2012-04-05 00:04:20 +02:00
listobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
longintrepr.h Issue #7652: Integrate the decimal floating point libmpdec library to speed 2012-03-21 18:25:23 +01:00
longobject.h Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args) 2012-05-29 12:57:52 +02:00
marshal.h
memoryobject.h Issue #14930: Make memoryview objects weakrefable. 2012-05-28 21:35:09 +01:00
metagrammar.h
methodobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
modsupport.h Issue #11626: Add _SizeT functions to stable ABI. 2012-06-24 00:00:30 +02:00
moduleobject.h
namespaceobject.h Eric Snow's implementation of PEP 421. 2012-06-03 16:18:47 -04:00
node.h MERGE: Closes #15512: Correct __sizeof__ support for parser 2012-08-03 14:29:26 +02:00
object.h Issue #13992: The trashcan mechanism is now thread-safe. This eliminates 2012-09-06 01:17:42 +02:00
objimpl.h Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t. 2012-09-20 20:56:47 +02:00
opcode.h Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
osdefs.h Issue #15835: Define PATH_MAX on HP-UX. 2012-11-12 20:14:36 +01:00
parsetok.h
patchlevel.h Post-release update. 2012-09-29 14:21:25 +02:00
pgen.h
pgenheaders.h
py_curses.h
pyarena.h
pyatomic.h
pycapsule.h
pyctype.h
pydebug.h Merge 3.2: Issue #13703 plus some related test suite fixes. 2012-02-21 00:33:36 +01:00
pyerrors.h use char instead of int to please T_BOOL (closes #15597) 2012-08-08 17:22:50 -07:00
pyexpat.h Issue #14007: implement doctype() method calling in XMLParser of _elementtree. 2012-06-01 11:32:34 +03:00
pyfpe.h Remove trailing whitespace in order to silence warnings on HP-UX. 2012-08-31 17:11:39 -04:00
pygetopt.h Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:03:47 +01:00
pymacconfig.h
pymacro.h GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89) 2012-09-23 16:15:01 +02:00
pymath.h
pymem.h
pyport.h Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:32:53 -08:00
pystate.h Issue #13992: The trashcan mechanism is now thread-safe. This eliminates 2012-09-06 01:17:42 +02:00
pystrcmp.h
pystrtod.h
pythonrun.h Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h. 2012-06-19 22:29:35 +02:00
pythread.h
pytime.h PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result 2012-06-12 22:46:37 +02:00
rangeobject.h
setobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
sliceobject.h
structmember.h s/tabs/spaces, and clean trailing whitespace 2012-05-23 07:09:08 +03:00
structseq.h
symtable.h Issue #5765: Apply a hard recursion limit in the compiler 2012-11-04 23:14:34 +10:00
sysmodule.h
token.h Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenNames indexes. 2012-01-15 19:15:36 -06:00
traceback.h
tupleobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
typeslots.h
ucnhash.h
unicodeobject.h #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka. 2012-10-05 03:33:31 +03:00
warnings.h
weakrefobject.h Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. 2012-12-08 21:15:26 +01:00