[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] fix C4204 errors while building swig-py with Python 3.9 on Windows

From: Jun Omae <jun66j5_at_gmail.com>
Date: Mon, 16 Nov 2020 12:16:00 +0900

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.

-- 
Jun Omae <jun66j5_at_gmail.com> ($BBgA0(B $B=a(B)

Received on 2020-11-16 04:16:14 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.