Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd4976b

Browse files
committed
Always #define _PyLong_FromDev as we always need it to compile rather than
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true. This "oops" issue reported by John E. Malmberg on core-mentorship. (what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2 parents bea0a28 + 702dada commit bd4976b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Modules/posixmodule.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,13 @@ _Py_Gid_Converter(PyObject *obj, void *p)
617617
#endif /* MS_WINDOWS */
618618

619619

620+
#ifdef HAVE_LONG_LONG
621+
# define _PyLong_FromDev PyLong_FromLongLong
622+
#else
623+
# define _PyLong_FromDev PyLong_FromLong
624+
#endif
625+
626+
620627
#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
621628
static int
622629
_Py_Dev_Converter(PyObject *obj, void *p)
@@ -630,14 +637,7 @@ _Py_Dev_Converter(PyObject *obj, void *p)
630637
return 0;
631638
return 1;
632639
}
633-
634-
#ifdef HAVE_LONG_LONG
635-
# define _PyLong_FromDev PyLong_FromLongLong
636-
#else
637-
# define _PyLong_FromDev PyLong_FromLong
638-
#endif
639-
640-
#endif
640+
#endif /* HAVE_MKNOD && HAVE_MAKEDEV */
641641

642642

643643
#ifdef AT_FDCWD

0 commit comments

Comments
 (0)