cpython/Include
Gregory P. Smith 27dc02e8c5 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.  We could work to get rid of the -fwrapv requirement
in 3.4 but that requires more planning.

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

Cleanup only - no functionality or hash values change.
2012-12-10 19:51:29 -08:00
..
abstract.h Issue #16148: Small improvements and cleanup. Added version information 2012-10-07 10:29:32 +02:00
accu.h
asdl.h create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
ast.h
bitset.h
bltinmodule.h
boolobject.h
bytearrayobject.h
bytes_methods.h
bytesobject.h
cellobject.h
ceval.h
classobject.h
code.h
codecs.h
compile.h
complexobject.h
datetime.h
descrobject.h
dictobject.h
dtoa.h
dynamic_annotations.h
enumobject.h
errcode.h
eval.h
fileobject.h
fileutils.h
floatobject.h
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
graminit.h
grammar.h make PyGrammar_LabelRepr return a const char * (closes #16369) 2012-10-31 13:36:13 -04:00
import.h
intrcheck.h
iterobject.h
listobject.h
longintrepr.h
longobject.h
marshal.h
memoryobject.h
metagrammar.h
methodobject.h
modsupport.h
moduleobject.h
namespaceobject.h
node.h
object.h remove unused flag (closes #16505) 2012-11-18 20:49:39 -06:00
objimpl.h Using 'long double' to force this structure to be worst case aligned is no 2012-12-10 18:05:05 -08:00
opcode.h
osdefs.h Merge 3.3. 2012-11-12 20:24:09 +01:00
parsetok.h
patchlevel.h
pgen.h
pgenheaders.h
py_curses.h
pyarena.h
pyatomic.h
pycapsule.h
pyctype.h
pydebug.h
pyerrors.h
pyexpat.h
pyfpe.h
pygetopt.h
pymacconfig.h
pymacro.h
pymath.h
pymem.h
pyport.h Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 19:51:29 -08:00
pystate.h
pystrcmp.h
pystrtod.h
Python-ast.h create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
Python.h
pythonrun.h
pythread.h
pytime.h
rangeobject.h
setobject.h
sliceobject.h Issue #16451: Refactor to remove duplication between range and slice in slice index computations. 2012-11-17 19:18:10 +00:00
structmember.h
structseq.h
symtable.h Issue #5765: Merge from 3.3 2012-11-04 23:53:15 +10:00
sysmodule.h
token.h make _PyParser_TokenNames const 2012-10-24 08:21:52 -07:00
traceback.h
tupleobject.h
typeslots.h
ucnhash.h
unicodeobject.h Issue #16455: On FreeBSD and Solaris, if the locale is C, the 2012-12-04 01:34:47 +01: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