binutils-gdb/gdb/python
Jan Kratochvil 881d5d5db0 Fix Python 3 build error on 32-bit hosts
on Fedora Rawhide (==22) i686 using --with-python=/usr/bin/python3 one gets:

./python/py-value.c:1696:3: error: initialization from incompatible pointer type [-Werror]
   valpy_hash,            /*tp_hash*/
   ^
./python/py-value.c:1696:3: error: (near initialization for ‘value_object_type.tp_hash’) [-Werror]
cc1: all warnings being treated as errors
Makefile:2628: recipe for target 'py-value.o' failed

This is because in Python 2 tp_hash was:
	typedef long (*hashfunc)(PyObject *);
while in Python 3 tp_hash is:
	typedef Py_hash_t (*hashfunc)(PyObject *);

Py_hash_t is int for 32-bit hosts and long for 64-bit hosts.  While on 32-bit
hosts sizeof(long)==sizeof(int) still the hashfunc type is formally
incompatible.  As this patch should have no compiled code change it is not
really necessary for gdb-7.9, it would fix there just this non-fatal
compilation warning:
	./python/py-value.c:1696:3: warning: initialization from incompatible pointer type
	   valpy_hash,            /*tp_hash*/
	   ^
	./python/py-value.c:1696:3: warning: (near initialization for ‘value_object_type.tp_hash’)

gdb/ChangeLog
2015-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* python/python-internal.h (Py_hash_t): Define it for Python <3.2.
	* python/py-value.c (valpy_fetch_lazy): Use it.  Remove cast to the
	return type.
2015-02-04 20:31:17 +01:00
..
lib/gdb Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-arch.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-auto-load.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-block.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-bpevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-breakpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-cmd.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-continueevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-event.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-event.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-events.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-evtregistry.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-evts.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-exitedevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-finishbreakpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-frame.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-framefilter.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-function.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-gdb-readline.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-inferior.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-infevents.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-infthread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-lazy-string.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-linetable.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-newobjfileevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-objfile.c Add gdb.Objfile.username. 2015-01-27 10:13:52 -08:00
py-param.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-prettyprint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-progspace.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-signalevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-stopevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-stopevent.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-symbol.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-symtab.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-threadevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-type.c [python,guile] Add comment beside conditions testing empty arrays. 2015-01-07 07:36:20 +04:00
py-utils.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-value.c Fix Python 3 build error on 32-bit hosts 2015-02-04 20:31:17 +01:00
py-varobj.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-xmethods.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
python-config.py Add support for Python 3. 2012-12-12 16:47:30 +00:00
python-internal.h Fix Python 3 build error on 32-bit hosts 2015-02-04 20:31:17 +01:00
python.c Add support for inlining scripts into .debug_gdb_scripts. 2015-01-31 12:01:13 -08:00
python.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00