mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
are used. Move also _Py_IDENTIFIER() defintions to the top in modified files to remove identifiers duplicated in the same file.
This commit is contained in:
parent
07e9e380f9
commit
bd303c165b
17 changed files with 93 additions and 89 deletions
|
|
@ -26,6 +26,11 @@
|
|||
(anyway, the length is smaller than 30 characters) */
|
||||
#define PUTS(fd, str) write(fd, str, (int)strlen(str))
|
||||
|
||||
_Py_IDENTIFIER(enable);
|
||||
_Py_IDENTIFIER(fileno);
|
||||
_Py_IDENTIFIER(flush);
|
||||
_Py_IDENTIFIER(stderr);
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
typedef struct sigaction _Py_sighandler_t;
|
||||
#else
|
||||
|
|
@ -130,13 +135,11 @@ static PyObject*
|
|||
faulthandler_get_fileno(PyObject *file, int *p_fd)
|
||||
{
|
||||
PyObject *result;
|
||||
_Py_IDENTIFIER(fileno);
|
||||
_Py_IDENTIFIER(flush);
|
||||
long fd_long;
|
||||
int fd;
|
||||
|
||||
if (file == NULL || file == Py_None) {
|
||||
file = _PySys_GetObjectId(&_PyId_stderr);
|
||||
file = _PySys_GetObjectId(&PyId_stderr);
|
||||
if (file == NULL) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "unable to get sys.stderr");
|
||||
return NULL;
|
||||
|
|
@ -1047,7 +1050,6 @@ static int
|
|||
faulthandler_env_options(void)
|
||||
{
|
||||
PyObject *xoptions, *key, *module, *res;
|
||||
_Py_IDENTIFIER(enable);
|
||||
char *p;
|
||||
|
||||
if (!((p = Py_GETENV("PYTHONFAULTHANDLER")) && *p != '\0')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue