binutils-gdb/gdb/python
Tom Tromey 12c58cd4dc Avoid -Wduplicated-cond warnings in gdb/python
I tried building gdb with -Wduplicated-cond.  This patch fixes the
simpler issue that was found.

In Python 3, "int" and "long" are synonyms, so code like:

      else if (PyLong_Check (obj))
...
      else if (PyInt_Check (obj))

.... will trigger this warning.  The fix is to conditionalize the
PyInt_Check branches on Python 2.

Tested by rebuilding, with both version of Python, on x86-64 Fedora 24.

2016-09-20  Tom Tromey  <tom@tromey.com>

	* python/py-value.c (convert_value_from_python): Make PyInt_Check
	conditional on Python 2.
	* python/py-arch.c (archpy_disassemble): Make PyInt_Check
	conditional on Python 2.
2016-09-20 10:35:27 -06:00
..
lib/gdb PR python/19293 - invalidate frame cache when unwinders change 2016-07-12 13:56:07 -06:00
py-arch.c Avoid -Wduplicated-cond warnings in gdb/python 2016-09-20 10:35:27 -06:00
py-auto-load.c
py-block.c
py-bpevent.c
py-breakpoint.c Add missing newline to py-breakpoint.c 2016-07-14 11:51:12 -06:00
py-cmd.c
py-continueevent.c
py-event.c
py-event.h
py-events.h PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-evtregistry.c
py-evts.c PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c PR python/18565 - make Frame.function work for inline frames 2016-08-03 09:04:08 -06:00
py-framefilter.c Remove unused variables 2016-07-14 10:35:40 -06:00
py-function.c
py-gdb-readline.c
py-inferior.c
py-infevents.c
py-infthread.c
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c
py-param.c
py-prettyprint.c Support structure offsets that are 512K or larger. 2016-06-24 21:02:36 -04:00
py-progspace.c
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c
py-type.c
py-unwind.c
py-utils.c
py-value.c Avoid -Wduplicated-cond warnings in gdb/python 2016-09-20 10:35:27 -06:00
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h Support structure offsets that are 512K or larger. 2016-06-24 21:02:36 -04:00
python.c Introduce cleanup to restore current_uiout 2016-09-16 15:44:29 -04:00
python.h