Re: Proposal: Drop GDB support for Python versions < 2.6

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
If we do this, it'd be good to go over gdb/python/python-internal.h and
remove obsolete workarounds such as:

~~~

/* The second argument to PyObject_GetAttrString was missing the 'const'
   qualifier in Python-2.4.  Hence, we wrap it in a function to avoid errors
   when compiled with -Werror.  */

static inline PyObject *
gdb_PyObject_GetAttrString (PyObject *obj,
                            const char *attr) /* ARI: editCase function */
{
  return PyObject_GetAttrString (obj, (char *) attr);
}

#define PyObject_GetAttrString(obj, attr) gdb_PyObject_GetAttrString (obj, attr)

~~~

/* Python 2.4 doesn't include stdint.h soon enough to get {u,}intptr_t
   needed by pyport.h.  */
/* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE
   if it sees _GNU_SOURCE (which config.h will define).
   pyconfig.h defines _POSIX_C_SOURCE to a different value than
   /usr/include/features.h does causing compilation to fail.
   To work around this, undef _POSIX_C_SOURCE before we include Python.h.

   Same problem with _XOPEN_SOURCE.  */
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

~~~

etc.

Thanks,
Pedro Alves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.