aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-12-14 15:46:47 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-12-14 15:46:47 -0500
commit8e557e52b3fd45a56fb42dbbaad3d6ece3694eb4 (patch)
tree46bd230fc06d345edc7b9669bd0c07554836c8ff /gdb/valops.c
parent863f7a5f4811c24d9a5863ffb541ff3da1511450 (diff)
downloadfsf-binutils-gdb-8e557e52b3fd45a56fb42dbbaad3d6ece3694eb4.zip
fsf-binutils-gdb-8e557e52b3fd45a56fb42dbbaad3d6ece3694eb4.tar.gz
fsf-binutils-gdb-8e557e52b3fd45a56fb42dbbaad3d6ece3694eb4.tar.bz2
py-breakpoint: Don't use the 'p' PyArg_ParseTupleAndKeywords format specifier
In Python 3, the 'p' format specifier can be passed to PyArg_ParseTupleAndKeywords to test the argument for truth and convert it to a boolean value (the p stands for predicate). However, it is not available in Python 2, causing this error: Traceback (most recent call last): File "test.py", line 1, in <module> b1 = gdb.Breakpoint("foo", qualified=False) TypeError: argument 10 (impossible<bad format char>) This patch changes it to the 'O' specifier, which returns the Python object passed in without transformation, and uses PyObject_IsTrue on it. This is what is done for the other boolean parameters of this function (internal and temporary). This fixes the test gdb.python/py-breakpoint.exp for Python 2. gdb/ChangeLog: * python/py-breakpoint.c (bppy_init): Use 'O' format specifier for "qualified" and use PyObject_IsTrue.
Diffstat (limited to 'gdb/valops.c')
0 files changed, 0 insertions, 0 deletions