On 16.11.2020 04:16, Jun Omae wrote:
Hi,
I tried to build swig-py with Python 3.9 on Windows, however get the
following errors:
[[[
C:\usr\apps\python39\include\cpython\abstract.h(205,1): error C4204:
nonstandard extension used: non-constant aggregate initializer
[C:\usr\src\subversion\trunk-py39\build\win32\vcnet-vcproj\libsvn_swig_py.vcxproj]
C:\usr\apps\python39\include\cpython\abstract.h(250,1): error C4204:
nonstandard extension used: non-constant aggregate initializer
[C:\usr\src\subversion\trunk-py39\build\win32\vcnet-vcproj\libsvn_swig_py.vcxproj]
]]]
The error was raised from the line 205 in cpython/abstract.h in Python
3.9:
[[[
202 static inline PyObject *
203 PyObject_CallMethodOneArg(PyObject *self, PyObject *name,
PyObject *arg)
204 {
205 PyObject *args[2] = {self, arg};
206
]]]
The attached patch adds #pragma warning to make C4204 a warning
instead of an
error only on building swig-py with Visual Studio.
+1