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

Re: svn commit: r1053996 [1/2] - in /subversion/trunk/subversion: include/ include/private/ libsvn_client/ libsvn_diff/ libsvn_fs_base/ libsvn_fs_base/bdb/ libsvn_fs_fs/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_subr/ libsvn_wc/ mod_authz_svn/ ...

From: Branko Čibej <brane_at_xbc.nu>
Date: Tue, 04 Jan 2011 16:27:19 +0100

On 04.01.2011 16:20, Philip Martin wrote:
> danielsh_at_apache.org writes:
>
>> Author: danielsh
>> Date: Thu Dec 30 20:13:50 2010
>> New Revision: 1053996
>>
>> URL: http://svn.apache.org/viewvc?rev=1053996&view=rev
>> Log:
>> Once and for all, name all our anonymous struct/enum typedefs.
>>
>> Follows up on r1040058, and with thanks to Danny Trebbien.
>>
>> * everywhere:
>> Change 'typedef struct {} foo_t;' to 'typedef struct foo_t {} foo_t;'.
> If there is a consensus that this is a good thing to do then we should
> add it to our coding guidelines

I frankly see no reason at all to do this "everywhere", it's just
unnecessary code churn. The struct tags are only useful if the structure
references itself (via pointers), and our practice for such cases was to
declare the typedef first, and the struct itself below it, and use the
typedef name in the struct definition.

So unless someone can explain the reasoning why all these anonymous
structs and enums etc. should have names -- on technical grounds, not
some stylistic hand-waving -- then please revert.

-- Brane
Received on 2011-01-04 16:28:02 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.