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

Re: svn commit: r921181 - in /subversion/trunk/subversion/bindings/javahl/native: CopySources.h JNIThreadData.h RevisionRange.h RevpropTable.h

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 09 Mar 2010 15:09:36 -0800

On 03/09/2010 03:05 PM, Hyrum K. Wright wrote:
>
> On Mar 9, 2010, at 4:46 PM, Blair Zajac wrote:
>
>> On 03/09/2010 02:41 PM, hwright_at_apache.org wrote:
>>> Author: hwright
>>> Date: Tue Mar 9 22:41:16 2010
>>> New Revision: 921181
>>>
>>> URL: http://svn.apache.org/viewvc?rev=921181&view=rev
>>> Log:
>>> JavaHL: Fix a few header files to avoid a redundant declaration of SVN::Pool.
>>> Instead of declaring the class (when it might also be declared previously by
>>> some other header file), just include the header if needed. The header already
>>> has the required #ifdef protection, and it doesn't cost much to parse it
>>> again anyway.
>>
>> Standard practice is to only include header files one needs for the definition. Plus, it's not just that, but the cost of recompiling everything that then #include's that header file if you touch Pooo.h
>
> I try to stay as far away from Pooo.h has possible. :)

Me too. I should read what I write :)

> SVN::Pool;
>
> The last line creates a warning, but only occasionally, depending on where the declaration falls in relation to various other includes (which are often in other files). The available options are:
> 1) Status quo
> 2) r921181
> 3) Wrap all SVN::Pool declarations with #ifdef's to avoid duplicate declaration warnings
> 4) Audit the entire header file corpus to ensure all declarations are properly ordered.
>
> I chose (2), which gives the benefits desired with the least amount of work. The problem really goes much farther than SVN::Pool: we include a number of our header files in other header files. To properly solve the problem requires (4); reverting r921181 doesn't really fix anything, it's just shuffling deck chairs.
>
> If anybody wants to tackle (4), please feel free.

OK. Thanks for letting me know the choices. Definitely, (2) is the
easiest.

Blair
Received on 2010-03-10 00:10:13 CET

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