This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] -Wwrite-strings: More fix-old-Python-API wrappers


*** TEST RESULTS FOR COMMIT 4d75997912d77497fd395fde222513436a7df046 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 4d75997912d77497fd395fde222513436a7df046

-Wwrite-strings: More fix-old-Python-API wrappers

When building against Python 2.7, -Wwrite-strings flags several cases
of passing a string literal to Python functions that expect a "char
*".  This commit addresses the issue like we already handle several
other similar cases -- wrap the Python API with our own fixed
version that adds the necessary constification.

gdb/ChangeLog:
2017-04-05  Pedro Alves  <palves@redhat.com>

	* python/python-internal.h (gdb_PyObject_CallMethod)
	(gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
	New functions.
	(GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
	(PySys_GetObject, PySys_SetPath): New macros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]