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

Skip to content

Commit 702dada

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?)
1 parent fa73779 commit 702dada

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
@@ -623,6 +623,13 @@ _Py_Gid_Converter(PyObject *obj, void *p)
623623
#endif /* MS_WINDOWS */
624624

625625

626+
#ifdef HAVE_LONG_LONG
627+
# define _PyLong_FromDev PyLong_FromLongLong
628+
#else
629+
# define _PyLong_FromDev PyLong_FromLong
630+
#endif
631+
632+
626633
#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
627634
static int
628635
_Py_Dev_Converter(PyObject *obj, void *p)
@@ -636,14 +643,7 @@ _Py_Dev_Converter(PyObject *obj, void *p)
636643
return 0;
637644
return 1;
638645
}
639-
640-
#ifdef HAVE_LONG_LONG
641-
# define _PyLong_FromDev PyLong_FromLongLong
642-
#else
643-
# define _PyLong_FromDev PyLong_FromLong
644-
#endif
645-
646-
#endif
646+
#endif /* HAVE_MKNOD && HAVE_MAKEDEV */
647647

648648

649649
#ifdef AT_FDCWD

0 commit comments

Comments
 (0)