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 GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-block.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-bpevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-breakpoint.c Add missing newline to py-breakpoint.c 2016-07-14 11:51:12 -06:00
py-cmd.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-continueevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-event.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-event.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-events.h PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-evtregistry.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-evts.c PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-exitedevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finishbreakpoint.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
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 GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-gdb-readline.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-inferior.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-infevents.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-infthread.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-lazy-string.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-linetable.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-newobjfileevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile.c Fix PR python/19438, PR python/18393 - initialize dictionaries 2016-05-23 10:08:34 -06:00
py-param.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-prettyprint.c Support structure offsets that are 512K or larger. 2016-06-24 21:02:36 -04:00
py-progspace.c Fix PR python/19438, PR python/18393 - initialize dictionaries 2016-05-23 10:08:34 -06:00
py-signalevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-stopevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-stopevent.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-symbol.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-symtab.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-threadevent.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-type.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-unwind.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-utils.c python/py-utils.c (host_string_to_python_string): New function. 2016-03-29 23:48:35 -07:00
py-value.c Avoid -Wduplicated-cond warnings in gdb/python 2016-09-20 10:35:27 -06:00
py-varobj.c remove trivialy unused variables 2016-05-07 20:12:53 -04:00
py-xmethods.c PR python/19819 - remove unused globals from py-xmethods.c 2016-06-09 14:29:21 -06:00
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 GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00