Skip to content
  • Pedro Alves's avatar
    -Wwrite-strings: More fix-old-Python-API wrappers · 4d759979
    Pedro Alves authored
    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.
    4d759979