This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: PyStructSequence_UnnamedField not exported
Type: compile error Stage: resolved
Components: Windows Versions: Python 3.8
Status: closed Resolution: duplicate
Dependencies: Superseder: PyStructSequence_UnnamedField unavailable on Windows
View: 44220
Assigned To: Nosy List: benjamin.peterson,, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-08-19 12:43 by, last changed 2022-04-11 14:59 by admin. This issue is now closed.

File name Uploaded Description Edit
structseq.h, 2019-08-19 15:54
Messages (2)
msg349956 - (view) Author: Jeff Robbins ( * Date: 2019-08-19 12:43
Python 3.8.0b3 has the fixed, but one of the documented features of PyStructSequence is the special which is meant to be used for unnamed (and presumably also "hidden") fields.

However, this variable is not "exported" (via __declspec(dllexport) or the relevant Python C macro) and so my C extension cannot "import" it and use it.

My guess is that this passed testing because the only tests using it are internal modules linked into python38.dll, which are happy with the `extern` in the header:

Include\structseq.h:extern char* PyStructSequence_UnnamedField;
msg349961 - (view) Author: Jeff Robbins ( * Date: 2019-08-19 15:54
Editing one line in structseq.h seems to fix the issue.

I changed this

extern char* PyStructSequence_UnnamedField;


PyAPI_DATA(char*) PyStructSequence_UnnamedField;

rebuilt, and now my C extension can use PyStructSequence_UnnamedField.
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82067
2022-01-23 18:58:56iritkatrielsetstatus: open -> closed
superseder: PyStructSequence_UnnamedField unavailable on Windows
resolution: duplicate
stage: resolved
2019-08-21 12:44:00ZackerySpytzsetnosy: + benjamin.peterson
2019-08-19 15:54:06jeffr@livedata.comsetfiles: + structseq.h

messages: + msg349961
2019-08-19 12:43:49jeffr@livedata.comcreate