Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
$(CC) -c $(PY_CORE_CFLAGS) \
-DABIFLAGS='"$(ABIFLAGS)"' \
-DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
$(MULTIARCH_CPPFLAGS) \
-o $@ $(srcdir)/Python/sysmodule.c

Expand Down
6 changes: 5 additions & 1 deletion Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3250,14 +3250,15 @@
{"micro", "Patch release number"},
{"releaselevel", "'alpha', 'beta', 'candidate', or 'final'"},
{"serial", "Serial release number"},
{"devel", "Development build"},
{0}
};

static PyStructSequence_Desc version_info_desc = {
"sys.version_info", /* name */
version_info__doc__, /* doc */
version_info_fields, /* fields */
5
5 /* n_in_sequence */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 6, no?

};

static PyObject *
Expand Down Expand Up @@ -3290,12 +3291,15 @@
PyStructSequence_SET_ITEM(version_info, pos++, PyLong_FromLong(flag))
#define SetStrItem(flag) \
PyStructSequence_SET_ITEM(version_info, pos++, PyUnicode_FromString(flag))
#define SetBoolItem(flag) \
PyStructSequence_SET_ITEM(version_info, pos++, PyBool_FromLong(flag))

SetIntItem(PY_MAJOR_VERSION);
SetIntItem(PY_MINOR_VERSION);
SetIntItem(PY_MICRO_VERSION);
SetStrItem(s);
SetIntItem(PY_RELEASE_SERIAL);
SetBoolItem(strncmp(GITTAG, "tags/", 5));

Check failure on line 3302 in Python/sysmodule.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'GITTAG': undeclared identifier [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 3302 in Python/sysmodule.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'function': 'const char *' differs in levels of indirection from 'int' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 3302 in Python/sysmodule.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'strncmp': different types for formal and actual parameter 1 [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]
#undef SetIntItem
#undef SetStrItem

Expand Down
Loading