Message304661
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. |
|
Date |
User |
Action |
Args |
2017-10-20 16:07:56 | scoder | set | recipients:
+ scoder, ncoghlan, masamoto |
2017-10-20 16:07:56 | scoder | set | messageid: <1508515676.46.0.213398074469.issue31828@psf.upfronthosting.co.za> |
2017-10-20 16:07:56 | scoder | link | issue31828 messages |
2017-10-20 16:07:56 | scoder | create | |
|