[3.6] bpo-29619: Convert st_ino using unsigned integer (#557) by vstinner · Pull Request #584 · python/cpython
PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode)); #ifdef HAVE_LARGEFILE_SUPPORT #if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS) Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino)); PyStructSequence_SET_ITEM(v, 1, PyLong_FromLongLong((long long)st->st_ino)); PyLong_FromUnsignedLongLong(st->st_ino)); #else PyStructSequence_SET_ITEM(v, 1, PyLong_FromLong((long)st->st_ino)); Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino)); PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino)); #endif #ifdef MS_WINDOWS PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));