➜

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.

作者 scoder
收信人 masamoto, ncoghlan, scoder
日期 2017-10-20.16:07:56
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1508515676.46.0.213398074469.issue31828@psf.upfronthosting.co.za>
In-reply-to
内容
Following up on issue 25658, it was found that the current definition of Py_tss_NEEDS_INIT restricts its use to initialisers in C and cannot be used for arbitrary assignments. It is currently declared as follows:

    #define Py_tss_NEEDS_INIT   {0}

which results in a C compiler error for assignments like "x = Py_tss_NEEDS_INIT".

I proposed to change this to

    #define Py_tss_NEEDS_INIT   ((Py_tss_t) {0})

in compliance with GCC and C99, but that fails to compile in MSVC and probably other old C++-ish compilers.

I'm not sure how to improve this declaration, but given that it's a public header file, restricting its applicability seems really unfortunate.
历史
日期 用户 动作 参数
2017-10-20 16:07:56scoder修改recipients: + scoder, ncoghlan, masamoto
2017-10-20 16:07:56scoder修改messageid: <1508515676.46.0.213398074469.issue31828@psf.upfronthosting.co.za>
2017-10-20 16:07:56scoder链接issue31828 messages
2017-10-20 16:07:56scoder创建