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

Re: Python3 work [was: The run up to Subversion 1.13.0]

From: Branko Čibej <brane_at_apache.org>
Date: Sat, 28 Sep 2019 15:36:26 +0200

On 28.09.2019 11:20, Yasuhito FUTATSUKI wrote:
> On 2019/09/24 16:34, Branko Čibej wrote:
>> On 23.09.2019 22:48, Johan Corveleyn wrote:
>>> On Mon, Sep 23, 2019 at 1:53 AM Yasuhito FUTATSUKI
>>> <futatuki_at_poem.co.jp> wrote:
>>>> On 2019/09/23 6:16, Johan Corveleyn wrote:
>
>>>>> Building with Python 3.7.4 still fails with the same error though (no
>>>>> problem, I know your patch wasn't addressing that, just mentioning it
>>>>> here for completeness). Consequently I haven't been able to run the
>>>>> swig-python tests with python 3.7 yet.
>>>>>
>>>>> [[[
>>>>> c:\python37\include\pytime.h(123): error C4115: 'timeval': named type
>>>>> definition in parentheses
>>>>> [C:\research\svn\dev\swig-py3\build\win32\vcnet-vcproj\libsvn_swig_py.vcxproj
>>>>>
>>>>> ]]]
>>>> Here is a patch not to treat C4115 as error, globally. If this makes
>>>> it possible to build with Python 3.7 on Windows, then next step can be
>>>> to limit to apply this relaxation of compile option to files which
>>>> contains "#include <Python.h>" (most of them are generated by
>>>> swig...).
>>> Yes, that makes the build succeed, thanks. I can't comment on whether
>>> or not it's good to change this error into a warning overall, or just
>>> for a limited set of files. I'll leave that discussion to others :-).
>>
>> It should not be an error because the source is valid C, regardless of
>> what Microsoft's compiler thinks about it. :)
>
> However it is ourselves to decide treat it as an error, on r876281.
>
> https://svn.apache.org/viewvc?view=revision&revision=876281
>
> Unfortunately I can't find any reason or discussion about this
> decision, yet.
> That's why I try to treat it carefully. (Of course there might be no
> serious reason, though)

The most likely reason is that /our/ code should not contain a use of
'struct foo*' without at least a forward declaration or a typedef.
That's a coding style decision that we shouldn't enforce on generated
code (but it should be a warning, not an error). If you can turn off
that compiler option only for the files generated by Swig, that would be
great, but just turning it into a warning is good enough, IMO.

-- Brane
Received on 2019-09-28 15:36:32 CEST

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.