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

Re: svn commit: r20562 - trunk/subversion/include

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-11 20:14:12 CEST

I like the move towards consistency here. However, I've been
wondering what the reasoning for using named -- as opposed to
anonymous -- enums when they're also typedef'd? The naming has always
struck me as needless noise when the enums are referred to via their
typedef's name. And even assuming there's some good reason to use
named enums, why does the enum name include a "_t" suffix (for "type")
when they themself are not a typedef'd data type?

On Tue, 11 Jul 2006, maxb@tigris.org wrote:

> Author: maxb
> Date: Tue Jul 11 10:01:44 2006
> New Revision: 20562
>
> Modified:
> trunk/subversion/include/svn_cmdline.h
> trunk/subversion/include/svn_io.h
>
> Log:
> API: Use named, not anonymous, structs and enums in new-in-1.4 cases, for
> consistency with the majority of existing cases.
>
> * subversion/include/svn_io.h (svn_io_file_del_t)
> * subversion/include/svn_cmdline.h (svn_cmdline_prompt_baton_t)
>
>
> Modified: trunk/subversion/include/svn_cmdline.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_cmdline.h?pathrev=20562&r1=20561&r2=20562
> ==============================================================================
> --- trunk/subversion/include/svn_cmdline.h (original)
> +++ trunk/subversion/include/svn_cmdline.h Tue Jul 11 10:01:44 2006
> @@ -154,7 +154,7 @@
> *
> * @since New in 1.4.
> */
> -typedef struct {
> +typedef struct svn_cmdline_prompt_baton_t {
> svn_cancel_func_t cancel_func;
> void *cancel_baton;
> } svn_cmdline_prompt_baton_t;
>
> Modified: trunk/subversion/include/svn_io.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_io.h?pathrev=20562&r1=20561&r2=20562
> ==============================================================================
> --- trunk/subversion/include/svn_io.h (original)
> +++ trunk/subversion/include/svn_io.h Tue Jul 11 10:01:44 2006
> @@ -46,7 +46,7 @@
> * @since New in 1.4.
> *
> * Not specifying any of these means no removal at all. */
> -typedef enum
> +typedef enum svn_io_file_del_t
> {
> /** No deletion ever */
> svn_io_file_del_none = 0,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

  • application/pgp-signature attachment: stored
Received on Tue Jul 11 20:14:57 2006

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.