Author: cmpilato
Date: Fri Apr  5 17:24:30 2013
New Revision: 1465053

URL: http://svn.apache.org/r1465053
Log:
Minor tweaks for API consistency.

* subversion/include/svn_auth.h
  (svn_auth_cleanup_func_t): Was svn_auth_cleanup_callback.
  (svn_auth_cleanup_walk): Track type change, rename 'cleanup' to
    'cleanup_func', and update docstring for a bit more clarity.

* subversion/libsvn_subr/auth.h
  Track type and parameter name changes.  Also, employ the same
  internal preprocessor stuffs and formatting thereof that other
  header files use (__cplusplus, SVN_<libname>_<filename>).

* subversion/libsvn_subr/auth.c,
* subversion/libsvn_subr/simple_providers.c
  Track type and parameter name changes.

Modified:
    subversion/trunk/subversion/include/svn_auth.h
    subversion/trunk/subversion/libsvn_subr/auth.c
    subversion/trunk/subversion/libsvn_subr/auth.h
    subversion/trunk/subversion/libsvn_subr/simple_providers.c

Modified: subversion/trunk/subversion/include/svn_auth.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_auth.h?rev=1465053&r1=1465052&r2=1465053&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_auth.h (original)
+++ subversion/trunk/subversion/include/svn_auth.h Fri Apr  5 17:24:30 2013
@@ -790,22 +790,23 @@ svn_auth_get_simple_provider2(
  *
  * @since New in 1.8.
  */
-typedef svn_error_t * (*svn_auth_cleanup_callback)(svn_boolean_t *delete_cred,
-                                                   void *cleanup_baton,
-                                                   const char *cred_kind,
-                                                   const char *realmstring,
-                                                   const char *provider,
-                                                   apr_pool_t *scratch_pool);
-
-/** Call @a cleanup with information describing each currently cached
- * credential (in providers that support iterating). If the callback
- * confirms that the credential should be deleted, delete it.
+typedef svn_error_t *(*svn_auth_cleanup_func_t)(svn_boolean_t *delete_cred,
+                                                void *cleanup_baton,
+                                                const char *cred_kind,
+                                                const char *realmstring,
+                                                const char *provider,
+                                                apr_pool_t *scratch_pool);
+
+/** Call @a cleanup_func with information describing each currently
+ * cached credential (in providers registered with @a auth_baton that
+ * support iterating). If the callback confirms that the credential
+ * should be deleted, delete it.
  *
  * @since New in 1.8.
  */
 svn_error_t *
 svn_auth_cleanup_walk(svn_auth_baton_t *auth_baton,
-                      svn_auth_cleanup_callback cleanup,
+                      svn_auth_cleanup_func_t cleanup_func,
                       void *cleanup_baton,
                       apr_pool_t *scratch_pool);
 

Modified: subversion/trunk/subversion/libsvn_subr/auth.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/auth.c?rev=1465053&r1=1465052&r2=1465053&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/auth.c (original)
+++ subversion/trunk/subversion/libsvn_subr/auth.c Fri Apr  5 17:24:30 2013
@@ -617,14 +617,14 @@ svn_auth_get_platform_specific_client_pr
 
 svn_error_t *
 svn_auth_cleanup_walk(svn_auth_baton_t *baton,
-                      svn_auth_cleanup_callback cleanup,
+                      svn_auth_cleanup_func_t cleanup_func,
                       void *cleanup_baton,
                       apr_pool_t *scratch_pool)
 {
 
   if (svn_hash_gets(baton->tables, SVN_AUTH_CRED_SIMPLE))
     {
-      SVN_ERR(svn_auth__simple_cleanup_walk(baton, cleanup, cleanup_baton,
+      SVN_ERR(svn_auth__simple_cleanup_walk(baton, cleanup_func, cleanup_baton,
                                             baton->creds_cache, scratch_pool));
     }
   /* ### Maybe add support for other providers? */

Modified: subversion/trunk/subversion/libsvn_subr/auth.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/auth.h?rev=1465053&r1=1465052&r2=1465053&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/auth.h (original)
+++ subversion/trunk/subversion/libsvn_subr/auth.h Fri Apr  5 17:24:30 2013
@@ -21,8 +21,12 @@
  * ====================================================================
  */
 
-#ifndef SVN_SUBR_AUTH_H
-#define SVN_SUBR_AUTH_H
+#ifndef SVN_LIBSVN_SUBR_AUTH_H
+#define SVN_LIBSVN_SUBR_AUTH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 #include "svn_auth.h"
 
@@ -40,10 +44,15 @@ svn_auth__file_path(const char **path,
 /* Implementation of svn_auth_cleanup_walk() for the "simple" provider */
 svn_error_t *
 svn_auth__simple_cleanup_walk(svn_auth_baton_t *baton,
-                              svn_auth_cleanup_callback cleanup,
+                              svn_auth_cleanup_func_t cleanup_func,
                               void *cleanup_baton,
                               apr_hash_t *creds_cache,
                               apr_pool_t *scratch_pool);
 
 
-#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_LIBSVN_SUBR_AUTH_H */

Modified: subversion/trunk/subversion/libsvn_subr/simple_providers.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/simple_providers.c?rev=1465053&r1=1465052&r2=1465053&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/trunk/subversion/libsvn_subr/simple_providers.c Fri Apr  5 
17:24:30 2013
@@ -513,7 +513,7 @@ simple_save_creds(svn_boolean_t *saved,
 
 svn_error_t *
 svn_auth__simple_cleanup_walk(svn_auth_baton_t *baton,
-                              svn_auth_cleanup_callback cleanup,
+                              svn_auth_cleanup_func_t cleanup_func,
                               void *cleanup_baton,
                               apr_hash_t *creds_cache,
                               apr_pool_t *scratch_pool)
@@ -613,8 +613,8 @@ svn_auth__simple_cleanup_walk(svn_auth_b
             if (! realm)
               continue; /* Not an auth file */
 
-            SVN_ERR(cleanup(&delete_file, cleanup_baton, cred_kinds[i], 
realm->data,
-                            SVN_AUTH_CRED_SIMPLE, itempool));
+            SVN_ERR(cleanup_func(&delete_file, cleanup_baton, cred_kinds[i],
+                                 realm->data, SVN_AUTH_CRED_SIMPLE, itempool));
 
             if (delete_file)
               {


Reply via email to