You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/08/03 13:41:16 UTC

svn commit: r981828 - in /subversion/branches/performance/subversion: include/private/svn_file_handle_cache.h include/private/svn_temp_serializer.h libsvn_subr/svn_file_handle_cache.c libsvn_subr/svn_temp_serializer.c

Author: stefan2
Date: Tue Aug  3 11:41:16 2010
New Revision: 981828

URL: http://svn.apache.org/viewvc?rev=981828&view=rev
Log:
Revert r981665 because there is no such naming convention.
I guess it is my fault when I blindly follow advise .. *sigh*

Modified:
    subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h   (contents, props changed)
    subversion/branches/performance/subversion/include/private/svn_temp_serializer.h   (contents, props changed)
    subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c   (contents, props changed)
    subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c   (contents, props changed)

Modified: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h?rev=981828&r1=981827&r2=981828&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h Tue Aug  3 11:41:16 2010
@@ -20,7 +20,7 @@
  * ====================================================================
  * @endcopyright
  *
- * @file svn__file_handle_cache.h
+ * @file svn_file_handle_cache.h
  * @brief File handle cache API
  */
 
@@ -30,14 +30,14 @@
 /**
  * An opaque structure representing a cache for open file handles.
  */
-typedef struct svn__file_handle_cache_t svn__file_handle_cache_t;
+typedef struct svn_file_handle_cache_t svn_file_handle_cache_t;
 
 /**
  * An opaque structure representing a cached file handle being used
  * by the calling application.
  */
 typedef
-struct svn__file_handle_cache__handle_t svn__file_handle_cache__handle_t;
+struct svn_file_handle_cache__handle_t svn_file_handle_cache__handle_t;
 
 /**
  * Get an open file handle in @a f, for the file named @a fname with the
@@ -51,14 +51,14 @@ struct svn__file_handle_cache__handle_t 
  * returned is undefined.
  */
 svn_error_t *
-svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
-                             svn__file_handle_cache_t *cache,
-                             const char *fname,
-                             apr_int32_t flag,
-                             apr_fileperms_t perm,
-                             apr_off_t offset,
-                             int cookie,
-                             apr_pool_t *pool);
+svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
+                            svn_file_handle_cache_t *cache,
+                            const char *fname,
+                            apr_int32_t flag,
+                            apr_fileperms_t perm,
+                            apr_off_t offset,
+                            int cookie,
+                            apr_pool_t *pool);
 
 /**
  * Efficiently check whether the file handle cache @a cache holds an open 
@@ -67,8 +67,8 @@ svn__file_handle_cache__open(svn__file_h
  * that the respective file does not exist.
  */
 svn_boolean_t
-svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache,
-                                 const char *fname);
+svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache,
+                                const char *fname);
 
 /**
  * Return the APR level file handle underlying the cache file handle @a f.
@@ -76,7 +76,7 @@ svn__file_handle_cache__has_file(svn__fi
  * invalidated.
  */
 apr_file_t *
-svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f);
+svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f);
 
 /**
  * Return the name of the file that the cached handle @a f refers to.
@@ -84,7 +84,7 @@ svn__file_handle_cache__get_apr_handle(s
  * invalidated.
  */
 const char *
-svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f);
+svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f);
 
 /**
  * Return the cached file handle @a f to the cache. Depending on the number
@@ -92,13 +92,13 @@ svn__file_handle_cache__get_name(svn__fi
  * is NULL, already closed or an invalidated handle, this is a no-op.
  */
 svn_error_t *
-svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f);
+svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f);
 
 /**
  * Close all file handles currently not held by the application.
  */
 svn_error_t *
-svn__file_handle_cache__flush(svn__file_handle_cache_t *cache);
+svn_file_handle_cache__flush(svn_file_handle_cache_t *cache);
 
 /**
  * Creates a new file handle cache in @a cache. Up to @a max_handles
@@ -109,7 +109,7 @@ svn__file_handle_cache__flush(svn__file_
  * cache, @a thread_safe may be @c FALSE. Otherwise, it must be @c TRUE.
  */
 svn_error_t *
-svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
-                                     size_t max_handles,
-                                     svn_boolean_t thread_safe,
-                                     apr_pool_t *pool);
+svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
+                                    size_t max_handles,
+                                    svn_boolean_t thread_safe,
+                                    apr_pool_t *pool);

Propchange: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
            ('svn:eol-style' removed)

Modified: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_temp_serializer.h?rev=981828&r1=981827&r2=981828&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Tue Aug  3 11:41:16 2010
@@ -38,8 +38,7 @@ struct svn_stringbuf_t;
  * Opaque structure controlling the serialization process and holding the
  * intermediate as well as final results.
  */
-typedef
-struct svn__temp_serializer__context_t svn__temp_serializer__context_t;
+typedef struct svn_temp_serializer__context_t svn_temp_serializer__context_t;
 
 /**
  * Begin the serialization process for the @a source_struct and all objects
@@ -58,11 +57,11 @@ struct svn__temp_serializer__context_t s
  *
  * @return the serization context.
  */
-svn__temp_serializer__context_t *
-svn__temp_serializer__init(const void *source_struct,
-                           apr_size_t struct_size,
-                           apr_size_t suggested_buffer_size,
-                           apr_pool_t *pool);
+svn_temp_serializer__context_t *
+svn_temp_serializer__init(const void *source_struct,
+                          apr_size_t struct_size,
+                          apr_size_t suggested_buffer_size,
+                          apr_pool_t *pool);
 
 /**
  * Begin serialization of a referenced sub-structure within the
@@ -76,9 +75,9 @@ svn__temp_serializer__init(const void *s
  * svn_serializer__pop to realign the serialization context.
  */
 void
-svn__temp_serializer__push(svn__temp_serializer__context_t *context,
-                           const void * const * source_struct,
-                           apr_size_t struct_size);
+svn_temp_serializer__push(svn_temp_serializer__context_t *context,
+                          const void * const * source_struct,
+                          apr_size_t struct_size);
 
 /**
  * End the serialization of the current sub-structure. The serialization
@@ -89,7 +88,7 @@ svn__temp_serializer__push(svn__temp_ser
  * of the serialization process.
  */
 void
-svn__temp_serializer__pop(svn__temp_serializer__context_t *context);
+svn_temp_serializer__pop(svn_temp_serializer__context_t *context);
 
 /**
  * Serialize a string referenced from the current structure within the
@@ -98,15 +97,15 @@ svn__temp_serializer__pop(svn__temp_seri
  * serialized structure can be established.
  */
 void
-svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
-                                 const char * const * s);
+svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
+                                const char * const * s);
 
 /**
  * @return a reference to the data buffer containing the data serialialized
  * so far in the given serialization @a context.
  */
 struct svn_stringbuf_t *
-svn__temp_serializer__get(svn__temp_serializer__context_t *context);
+svn_temp_serializer__get(svn_temp_serializer__context_t *context);
 
 /**
  * Deserialization is straightforward: just copy the serialized buffer to
@@ -118,4 +117,4 @@ svn__temp_serializer__get(svn__temp_seri
  * the pointer to resolve in @a ptr.
  */
 void
-svn__temp_deserializer__resolve(void *buffer, void **ptr);
+svn_temp_deserializer__resolve(void *buffer, void **ptr);

Propchange: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
            ('svn:eol-style' removed)

Modified: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c?rev=981828&r1=981827&r2=981828&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c Tue Aug  3 11:41:16 2010
@@ -1,5 +1,5 @@
 /*
- * svn__file_handle_cache.c: open file handle caching for Subversion
+ * svn_file_handle_cache.c: open file handle caching for Subversion
  *
  * ====================================================================
  *    Licensed to the Apache Software Foundation (ASF) under one
@@ -67,7 +67,7 @@
  * between read-after-write, write-after-read or others.
  *
  * For similar reasons, an application may want to close all idle handles
- * explicitly, i.e. without opening new ones. svn__file_handle_cache__flush
+ * explicitly, i.e. without opening new ones. svn_file_handle_cache__flush
  * is the function to call in that case.
  */
 
@@ -129,7 +129,7 @@ struct cache_entry_t
 
   /* The cached file handle object handed out to the application.
    * If this is NULL, the entry is either idle or unused. */
-  svn__file_handle_cache__handle_t *open_handle;
+  svn_file_handle_cache__handle_t *open_handle;
 
   /* the file name. NULL for unused entries */
   const char *name;
@@ -161,7 +161,7 @@ struct cache_entry_t
 
 /* The file handle cache structure.
  */
-struct svn__file_handle_cache_t
+struct svn_file_handle_cache_t
 {
   /* all cache sub-structures are allocated from this pool */
   apr_pool_t *pool;
@@ -199,12 +199,12 @@ struct svn__file_handle_cache_t
  * either the handle has already been returned to the cache or the cache
  * itself has been destroyed already.
  */
-struct svn__file_handle_cache__handle_t
+struct svn_file_handle_cache__handle_t
 {
   /* the issuing cache. Having that element here simplifies function
    * signatures dealing with cached file handles. It also makes them
    * harder to use incorrectly. */
-  svn__file_handle_cache_t *cache;
+  svn_file_handle_cache_t *cache;
 
   /* the handle-specific information */
   cache_entry_t *entry;
@@ -213,7 +213,7 @@ struct svn__file_handle_cache__handle_t
 /* If applicable, locks CACHE's mutex. 
  */
 static svn_error_t *
-lock_cache(svn__file_handle_cache_t *cache)
+lock_cache(svn_file_handle_cache_t *cache)
 {
 #if APR_HAS_THREADS
   apr_status_t status;
@@ -231,7 +231,7 @@ lock_cache(svn__file_handle_cache_t *cac
 /* If applicable, unlocks CACHE's mutex, then returns ERR. 
  */
 static svn_error_t *
-unlock_cache(svn__file_handle_cache_t *cache, svn_error_t *err)
+unlock_cache(svn_file_handle_cache_t *cache, svn_error_t *err)
 {
 #if APR_HAS_THREADS
   apr_status_t status;
@@ -354,7 +354,7 @@ remove_from_list(entry_list_t *list, ent
  * If no such entry exists, the result is NULL.
  */
 static cache_entry_t *
-find_first(svn__file_handle_cache_t *cache, const char *name)
+find_first(svn_file_handle_cache_t *cache, const char *name)
 {
   cache_entry_t *result =
     (cache_entry_t *)apr_hash_get(cache->first_by_name,
@@ -394,7 +394,7 @@ auto_close_cached_handle(void *entry_voi
  */
 static svn_error_t *
 internal_file_open(cache_entry_t **result,
-                   svn__file_handle_cache_t *cache,
+                   svn_file_handle_cache_t *cache,
                    const char *name,
                    apr_int32_t flag,
                    apr_fileperms_t perm,
@@ -471,7 +471,7 @@ internal_file_open(cache_entry_t **resul
  * The entry will be in "unused" state afterwards.
  */
 static svn_error_t *
-internal_close_file(svn__file_handle_cache_t *cache, cache_entry_t *entry)
+internal_close_file(svn_file_handle_cache_t *cache, cache_entry_t *entry)
 {
   /* any cached file handle held by the application must have either
    * been returned or invalidated before, i.e. this entry must be "idle" */
@@ -524,14 +524,14 @@ internal_close_file(svn__file_handle_cac
 static apr_status_t
 close_handle_before_cleanup(void *handle_void)
 {
-  svn__file_handle_cache__handle_t *f = handle_void;
+  svn_file_handle_cache__handle_t *f = handle_void;
   svn_error_t *err = SVN_NO_ERROR;
 
   /* if this hasn't been done before: 
    * "close" the handle, i.e. return it to the cache 
    */
   if (f->entry)
-    err = svn__file_handle_cache__close(f);
+    err = svn_file_handle_cache__close(f);
 
   /* fully reset all members to prevent zombies doing damage */
   f->entry = NULL;
@@ -546,8 +546,8 @@ close_handle_before_cleanup(void *handle
  * is cleared or destroyed.
  */
 static svn_error_t *
-open_entry(svn__file_handle_cache__handle_t **f,
-           svn__file_handle_cache_t *cache,
+open_entry(svn_file_handle_cache__handle_t **f,
+           svn_file_handle_cache_t *cache,
            cache_entry_t *entry,
            apr_pool_t *pool)
 {
@@ -558,7 +558,7 @@ open_entry(svn__file_handle_cache__handl
   remove_from_list(&cache->idle_entries, &entry->idle_link);
 
   /* create and initialize the cached file handle structure */
-  *f = apr_palloc(pool, sizeof(svn__file_handle_cache__handle_t));
+  *f = apr_palloc(pool, sizeof(svn_file_handle_cache__handle_t));
   (*f)->cache = cache;
   (*f)->entry = entry;
   entry->open_handle = *f;
@@ -576,7 +576,7 @@ open_entry(svn__file_handle_cache__handl
  * underlying APR file handle rendering the entry "unused".
  */
 static svn_error_t *
-close_oldest_idle(svn__file_handle_cache_t *cache)
+close_oldest_idle(svn_file_handle_cache_t *cache)
 {
   return cache->idle_entries.first
     ? internal_close_file(cache, cache->idle_entries.first->item)
@@ -587,7 +587,7 @@ close_oldest_idle(svn__file_handle_cache
  * if there is such an entry.
  */
 static svn_error_t *
-auto_close_oldest(svn__file_handle_cache_t *cache)
+auto_close_oldest(svn_file_handle_cache_t *cache)
 {
   return cache->used_entries.count > cache->max_used_count
     ? close_oldest_idle(cache)
@@ -639,14 +639,14 @@ pointer_is_closer(const cache_entry_t *e
  * is undefined.
  */
 svn_error_t *
-svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
-                             svn__file_handle_cache_t *cache,
-                             const char *fname,
-                             apr_int32_t flag,
-                             apr_fileperms_t perm,
-                             apr_off_t offset,
-                             int cookie,
-                             apr_pool_t *pool)
+svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
+                            svn_file_handle_cache_t *cache,
+                            const char *fname,
+                            apr_int32_t flag,
+                            apr_fileperms_t perm,
+                            apr_off_t offset,
+                            int cookie,
+                            apr_pool_t *pool)
 {
   svn_error_t *err = SVN_NO_ERROR;
   cache_entry_t *entry;
@@ -728,8 +728,8 @@ svn__file_handle_cache__open(svn__file_h
  * the respective file does not exist.
  */
 svn_boolean_t
-svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache, 
-                                 const char *fname)
+svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache, 
+                                const char *fname)
 {
   svn_boolean_t result = FALSE;
 
@@ -764,7 +764,7 @@ svn__file_handle_cache__has_file(svn__fi
  * invalidated.
  */
 apr_file_t *
-svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f)
+svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f)
 {
   return (f && f->entry) ? f->entry->file : NULL;
 }
@@ -774,7 +774,7 @@ svn__file_handle_cache__get_apr_handle(s
  * invalidated.
  */
 const char *
-svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f)
+svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f)
 {
   return (f && f->entry) ? f->entry->name : NULL;
 }
@@ -783,10 +783,10 @@ svn__file_handle_cache__get_name(svn__fi
  * of open handles, the underlying handle may actually get closed.
  */
 svn_error_t *
-svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f)
+svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f)
 {
   svn_error_t *err = SVN_NO_ERROR;
-  svn__file_handle_cache_t *cache = f ? f->cache : NULL;
+  svn_file_handle_cache_t *cache = f ? f->cache : NULL;
   cache_entry_t *entry = f ? f->entry : NULL;
 
   /* no-op for closed or invalidated cached file handles */
@@ -828,7 +828,7 @@ svn__file_handle_cache__close(svn__file_
 /* Close all file handles currently not held by the application.
  */
 svn_error_t *
-svn__file_handle_cache__flush(svn__file_handle_cache_t *cache)
+svn_file_handle_cache__flush(svn_file_handle_cache_t *cache)
 {
   svn_error_t *err = SVN_NO_ERROR;
 
@@ -867,14 +867,14 @@ svn__file_handle_cache__flush(svn__file_
  * THREAD_SAFE may be FALSE. Otherwise, it must be TRUE.
  */
 svn_error_t *
-svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
-                                     size_t max_handles,
-                                     svn_boolean_t thread_safe,
-                                     apr_pool_t *pool)
+svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
+                                    size_t max_handles,
+                                    svn_boolean_t thread_safe,
+                                    apr_pool_t *pool)
 {
   /* allocate cache header */
-  svn__file_handle_cache_t *new_cache =
-      (svn__file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
+  svn_file_handle_cache_t *new_cache =
+      (svn_file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
 
   /* create sub-pool for all cache sub-structures */
   new_cache->pool = svn_pool_create(pool);

Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
            ('svn:eol-style' removed)

Modified: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c?rev=981828&r1=981827&r2=981828&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c Tue Aug  3 11:41:16 2010
@@ -58,7 +58,7 @@ typedef struct source_stack_t
 /* Serialization context info. It basically consists of the buffer holding
  * the serialized result and the stack of source structure information.
  */
-struct svn__temp_serializer__context_t
+struct svn_temp_serializer__context_t
 {
   /* allocations are made from this pool */
   apr_pool_t *pool;
@@ -77,7 +77,7 @@ struct svn__temp_serializer__context_t
  * guarantees.
  */
 static void
-align_buffer_end(svn__temp_serializer__context_t *context)
+align_buffer_end(svn_temp_serializer__context_t *context)
 {
   apr_size_t current_len = context->buffer->len;
   apr_size_t aligned_len = APR_ALIGN_DEFAULT(current_len);
@@ -95,11 +95,11 @@ align_buffer_end(svn__temp_serializer__c
  * re-allocations during the serialization process. All allocations will
  * be made from POOL.
  */
-svn__temp_serializer__context_t *
-svn__temp_serializer__init(const void *source_struct,
-                           apr_size_t struct_size,
-                           apr_size_t suggested_buffer_size,
-                           apr_pool_t *pool)
+svn_temp_serializer__context_t *
+svn_temp_serializer__init(const void *source_struct,
+                          apr_size_t struct_size,
+                          apr_size_t suggested_buffer_size,
+                          apr_pool_t *pool)
 {
   /* select a meaningful initial memory buffer capacity */
   apr_size_t init_size = suggested_buffer_size < struct_size
@@ -108,8 +108,7 @@ svn__temp_serializer__init(const void *s
 
   /* create the serialization context and initialize it, including the
    * structure stack */
-  svn__temp_serializer__context_t *context = apr_palloc(pool,
-                                                        sizeof(*context));
+  svn_temp_serializer__context_t *context = apr_palloc(pool, sizeof(*context));
   context->pool = pool;
   context->buffer = svn_stringbuf_create_ensure(init_size, pool);
   context->source = apr_palloc(pool, sizeof(*context->source));
@@ -129,7 +128,7 @@ svn__temp_serializer__init(const void *s
  * right after this function call.
  */
 static void
-store_current_end_pointer(svn__temp_serializer__context_t *context,
+store_current_end_pointer(svn_temp_serializer__context_t *context,
                           const void * const * source_pointer)
 {
   /* relative position of the serialized pointer to the begin of the buffer */
@@ -138,8 +137,7 @@ store_current_end_pointer(svn__temp_seri
                     + context->source->target_offset;
 
   /* use the serialized pointer as a storage for the offset */
-  apr_size_t *target_string_ptr = 
-    (apr_size_t*)(context->buffer->data + offset);
+  apr_size_t *target_string_ptr = (apr_size_t*)(context->buffer->data + offset);
 
   /* the offset must be within the serialized data. Otherwise, you forgot
    * to serialize the respective sub-struct. */
@@ -157,9 +155,9 @@ store_current_end_pointer(svn__temp_seri
  * result of sizeof() of the actual structure.
  */
 void
-svn__temp_serializer__push(svn__temp_serializer__context_t *context,
-                           const void * const * source_struct,
-                           apr_size_t struct_size)
+svn_temp_serializer__push(svn_temp_serializer__context_t *context,
+                          const void * const * source_struct,
+                          apr_size_t struct_size)
 {
   /* create a new entry for the structure stack */
   source_stack_t *new = apr_palloc(context->pool, sizeof(*new));
@@ -189,7 +187,7 @@ svn__temp_serializer__push(svn__temp_ser
 /* Remove the lastest structure from the stack.
  */
 void
-svn__temp_serializer__pop(svn__temp_serializer__context_t *context)
+svn_temp_serializer__pop(svn_temp_serializer__context_t *context)
 {
   /* we may pop the original struct but not further */
   assert(context->source);
@@ -204,8 +202,8 @@ svn__temp_serializer__pop(svn__temp_seri
  * structure can be established.
  */
 void
-svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
-                                 const char * const * s)
+svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
+                                const char * const * s)
 {
   /* Store the offset at which the string data that will the appended.
    * Write 0 for NULL pointers. Strings don't need special alignment. */
@@ -220,7 +218,7 @@ svn__temp_serializer__add_string(svn__te
  * the given serialization CONTEXT.
  */
 svn_stringbuf_t *
-svn__temp_serializer__get(svn__temp_serializer__context_t *context)
+svn_temp_serializer__get(svn_temp_serializer__context_t *context)
 {
   return context->buffer;
 }
@@ -229,7 +227,7 @@ svn__temp_serializer__get(svn__temp_seri
  * proper pointer value.
  */
 void
-svn__temp_deserializer__resolve(void *buffer, void **ptr)
+svn_temp_deserializer__resolve(void *buffer, void **ptr)
 {
   if ((apr_size_t)*ptr)
     {

Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
            ('svn:eol-style' removed)



Re: svn commit: r981828 - in /subversion/branches/performance/subversion: include/private/svn_file_handle_cache.h include/private/svn_temp_serializer.h libsvn_subr/svn_file_handle_cache.c libsvn_subr/svn_temp_serializer.c

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
I this is what I get for not reading the entire identifier.  I
apologize for the bad advice; I missed the second '__' farther down in
the symbol names.

-Hyrum

On Tue, Aug 3, 2010 at 6:41 AM,  <st...@apache.org> wrote:
> Author: stefan2
> Date: Tue Aug  3 11:41:16 2010
> New Revision: 981828
>
> URL: http://svn.apache.org/viewvc?rev=981828&view=rev
> Log:
> Revert r981665 because there is no such naming convention.
> I guess it is my fault when I blindly follow advise .. *sigh*
>
> Modified:
>    subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h   (contents, props changed)
>    subversion/branches/performance/subversion/include/private/svn_temp_serializer.h   (contents, props changed)
>    subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c   (contents, props changed)
>    subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c   (contents, props changed)
>
> Modified: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h (original)
> +++ subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h Tue Aug  3 11:41:16 2010
> @@ -20,7 +20,7 @@
>  * ====================================================================
>  * @endcopyright
>  *
> - * @file svn__file_handle_cache.h
> + * @file svn_file_handle_cache.h
>  * @brief File handle cache API
>  */
>
> @@ -30,14 +30,14 @@
>  /**
>  * An opaque structure representing a cache for open file handles.
>  */
> -typedef struct svn__file_handle_cache_t svn__file_handle_cache_t;
> +typedef struct svn_file_handle_cache_t svn_file_handle_cache_t;
>
>  /**
>  * An opaque structure representing a cached file handle being used
>  * by the calling application.
>  */
>  typedef
> -struct svn__file_handle_cache__handle_t svn__file_handle_cache__handle_t;
> +struct svn_file_handle_cache__handle_t svn_file_handle_cache__handle_t;
>
>  /**
>  * Get an open file handle in @a f, for the file named @a fname with the
> @@ -51,14 +51,14 @@ struct svn__file_handle_cache__handle_t
>  * returned is undefined.
>  */
>  svn_error_t *
> -svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
> -                             svn__file_handle_cache_t *cache,
> -                             const char *fname,
> -                             apr_int32_t flag,
> -                             apr_fileperms_t perm,
> -                             apr_off_t offset,
> -                             int cookie,
> -                             apr_pool_t *pool);
> +svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
> +                            svn_file_handle_cache_t *cache,
> +                            const char *fname,
> +                            apr_int32_t flag,
> +                            apr_fileperms_t perm,
> +                            apr_off_t offset,
> +                            int cookie,
> +                            apr_pool_t *pool);
>
>  /**
>  * Efficiently check whether the file handle cache @a cache holds an open
> @@ -67,8 +67,8 @@ svn__file_handle_cache__open(svn__file_h
>  * that the respective file does not exist.
>  */
>  svn_boolean_t
> -svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache,
> -                                 const char *fname);
> +svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache,
> +                                const char *fname);
>
>  /**
>  * Return the APR level file handle underlying the cache file handle @a f.
> @@ -76,7 +76,7 @@ svn__file_handle_cache__has_file(svn__fi
>  * invalidated.
>  */
>  apr_file_t *
> -svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Return the name of the file that the cached handle @a f refers to.
> @@ -84,7 +84,7 @@ svn__file_handle_cache__get_apr_handle(s
>  * invalidated.
>  */
>  const char *
> -svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Return the cached file handle @a f to the cache. Depending on the number
> @@ -92,13 +92,13 @@ svn__file_handle_cache__get_name(svn__fi
>  * is NULL, already closed or an invalidated handle, this is a no-op.
>  */
>  svn_error_t *
> -svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Close all file handles currently not held by the application.
>  */
>  svn_error_t *
> -svn__file_handle_cache__flush(svn__file_handle_cache_t *cache);
> +svn_file_handle_cache__flush(svn_file_handle_cache_t *cache);
>
>  /**
>  * Creates a new file handle cache in @a cache. Up to @a max_handles
> @@ -109,7 +109,7 @@ svn__file_handle_cache__flush(svn__file_
>  * cache, @a thread_safe may be @c FALSE. Otherwise, it must be @c TRUE.
>  */
>  svn_error_t *
> -svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
> -                                     size_t max_handles,
> -                                     svn_boolean_t thread_safe,
> -                                     apr_pool_t *pool);
> +svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
> +                                    size_t max_handles,
> +                                    svn_boolean_t thread_safe,
> +                                    apr_pool_t *pool);
>
> Propchange: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_temp_serializer.h?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
> +++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Tue Aug  3 11:41:16 2010
> @@ -38,8 +38,7 @@ struct svn_stringbuf_t;
>  * Opaque structure controlling the serialization process and holding the
>  * intermediate as well as final results.
>  */
> -typedef
> -struct svn__temp_serializer__context_t svn__temp_serializer__context_t;
> +typedef struct svn_temp_serializer__context_t svn_temp_serializer__context_t;
>
>  /**
>  * Begin the serialization process for the @a source_struct and all objects
> @@ -58,11 +57,11 @@ struct svn__temp_serializer__context_t s
>  *
>  * @return the serization context.
>  */
> -svn__temp_serializer__context_t *
> -svn__temp_serializer__init(const void *source_struct,
> -                           apr_size_t struct_size,
> -                           apr_size_t suggested_buffer_size,
> -                           apr_pool_t *pool);
> +svn_temp_serializer__context_t *
> +svn_temp_serializer__init(const void *source_struct,
> +                          apr_size_t struct_size,
> +                          apr_size_t suggested_buffer_size,
> +                          apr_pool_t *pool);
>
>  /**
>  * Begin serialization of a referenced sub-structure within the
> @@ -76,9 +75,9 @@ svn__temp_serializer__init(const void *s
>  * svn_serializer__pop to realign the serialization context.
>  */
>  void
> -svn__temp_serializer__push(svn__temp_serializer__context_t *context,
> -                           const void * const * source_struct,
> -                           apr_size_t struct_size);
> +svn_temp_serializer__push(svn_temp_serializer__context_t *context,
> +                          const void * const * source_struct,
> +                          apr_size_t struct_size);
>
>  /**
>  * End the serialization of the current sub-structure. The serialization
> @@ -89,7 +88,7 @@ svn__temp_serializer__push(svn__temp_ser
>  * of the serialization process.
>  */
>  void
> -svn__temp_serializer__pop(svn__temp_serializer__context_t *context);
> +svn_temp_serializer__pop(svn_temp_serializer__context_t *context);
>
>  /**
>  * Serialize a string referenced from the current structure within the
> @@ -98,15 +97,15 @@ svn__temp_serializer__pop(svn__temp_seri
>  * serialized structure can be established.
>  */
>  void
> -svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
> -                                 const char * const * s);
> +svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
> +                                const char * const * s);
>
>  /**
>  * @return a reference to the data buffer containing the data serialialized
>  * so far in the given serialization @a context.
>  */
>  struct svn_stringbuf_t *
> -svn__temp_serializer__get(svn__temp_serializer__context_t *context);
> +svn_temp_serializer__get(svn_temp_serializer__context_t *context);
>
>  /**
>  * Deserialization is straightforward: just copy the serialized buffer to
> @@ -118,4 +117,4 @@ svn__temp_serializer__get(svn__temp_seri
>  * the pointer to resolve in @a ptr.
>  */
>  void
> -svn__temp_deserializer__resolve(void *buffer, void **ptr);
> +svn_temp_deserializer__resolve(void *buffer, void **ptr);
>
> Propchange: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c (original)
> +++ subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c Tue Aug  3 11:41:16 2010
> @@ -1,5 +1,5 @@
>  /*
> - * svn__file_handle_cache.c: open file handle caching for Subversion
> + * svn_file_handle_cache.c: open file handle caching for Subversion
>  *
>  * ====================================================================
>  *    Licensed to the Apache Software Foundation (ASF) under one
> @@ -67,7 +67,7 @@
>  * between read-after-write, write-after-read or others.
>  *
>  * For similar reasons, an application may want to close all idle handles
> - * explicitly, i.e. without opening new ones. svn__file_handle_cache__flush
> + * explicitly, i.e. without opening new ones. svn_file_handle_cache__flush
>  * is the function to call in that case.
>  */
>
> @@ -129,7 +129,7 @@ struct cache_entry_t
>
>   /* The cached file handle object handed out to the application.
>    * If this is NULL, the entry is either idle or unused. */
> -  svn__file_handle_cache__handle_t *open_handle;
> +  svn_file_handle_cache__handle_t *open_handle;
>
>   /* the file name. NULL for unused entries */
>   const char *name;
> @@ -161,7 +161,7 @@ struct cache_entry_t
>
>  /* The file handle cache structure.
>  */
> -struct svn__file_handle_cache_t
> +struct svn_file_handle_cache_t
>  {
>   /* all cache sub-structures are allocated from this pool */
>   apr_pool_t *pool;
> @@ -199,12 +199,12 @@ struct svn__file_handle_cache_t
>  * either the handle has already been returned to the cache or the cache
>  * itself has been destroyed already.
>  */
> -struct svn__file_handle_cache__handle_t
> +struct svn_file_handle_cache__handle_t
>  {
>   /* the issuing cache. Having that element here simplifies function
>    * signatures dealing with cached file handles. It also makes them
>    * harder to use incorrectly. */
> -  svn__file_handle_cache_t *cache;
> +  svn_file_handle_cache_t *cache;
>
>   /* the handle-specific information */
>   cache_entry_t *entry;
> @@ -213,7 +213,7 @@ struct svn__file_handle_cache__handle_t
>  /* If applicable, locks CACHE's mutex.
>  */
>  static svn_error_t *
> -lock_cache(svn__file_handle_cache_t *cache)
> +lock_cache(svn_file_handle_cache_t *cache)
>  {
>  #if APR_HAS_THREADS
>   apr_status_t status;
> @@ -231,7 +231,7 @@ lock_cache(svn__file_handle_cache_t *cac
>  /* If applicable, unlocks CACHE's mutex, then returns ERR.
>  */
>  static svn_error_t *
> -unlock_cache(svn__file_handle_cache_t *cache, svn_error_t *err)
> +unlock_cache(svn_file_handle_cache_t *cache, svn_error_t *err)
>  {
>  #if APR_HAS_THREADS
>   apr_status_t status;
> @@ -354,7 +354,7 @@ remove_from_list(entry_list_t *list, ent
>  * If no such entry exists, the result is NULL.
>  */
>  static cache_entry_t *
> -find_first(svn__file_handle_cache_t *cache, const char *name)
> +find_first(svn_file_handle_cache_t *cache, const char *name)
>  {
>   cache_entry_t *result =
>     (cache_entry_t *)apr_hash_get(cache->first_by_name,
> @@ -394,7 +394,7 @@ auto_close_cached_handle(void *entry_voi
>  */
>  static svn_error_t *
>  internal_file_open(cache_entry_t **result,
> -                   svn__file_handle_cache_t *cache,
> +                   svn_file_handle_cache_t *cache,
>                    const char *name,
>                    apr_int32_t flag,
>                    apr_fileperms_t perm,
> @@ -471,7 +471,7 @@ internal_file_open(cache_entry_t **resul
>  * The entry will be in "unused" state afterwards.
>  */
>  static svn_error_t *
> -internal_close_file(svn__file_handle_cache_t *cache, cache_entry_t *entry)
> +internal_close_file(svn_file_handle_cache_t *cache, cache_entry_t *entry)
>  {
>   /* any cached file handle held by the application must have either
>    * been returned or invalidated before, i.e. this entry must be "idle" */
> @@ -524,14 +524,14 @@ internal_close_file(svn__file_handle_cac
>  static apr_status_t
>  close_handle_before_cleanup(void *handle_void)
>  {
> -  svn__file_handle_cache__handle_t *f = handle_void;
> +  svn_file_handle_cache__handle_t *f = handle_void;
>   svn_error_t *err = SVN_NO_ERROR;
>
>   /* if this hasn't been done before:
>    * "close" the handle, i.e. return it to the cache
>    */
>   if (f->entry)
> -    err = svn__file_handle_cache__close(f);
> +    err = svn_file_handle_cache__close(f);
>
>   /* fully reset all members to prevent zombies doing damage */
>   f->entry = NULL;
> @@ -546,8 +546,8 @@ close_handle_before_cleanup(void *handle
>  * is cleared or destroyed.
>  */
>  static svn_error_t *
> -open_entry(svn__file_handle_cache__handle_t **f,
> -           svn__file_handle_cache_t *cache,
> +open_entry(svn_file_handle_cache__handle_t **f,
> +           svn_file_handle_cache_t *cache,
>            cache_entry_t *entry,
>            apr_pool_t *pool)
>  {
> @@ -558,7 +558,7 @@ open_entry(svn__file_handle_cache__handl
>   remove_from_list(&cache->idle_entries, &entry->idle_link);
>
>   /* create and initialize the cached file handle structure */
> -  *f = apr_palloc(pool, sizeof(svn__file_handle_cache__handle_t));
> +  *f = apr_palloc(pool, sizeof(svn_file_handle_cache__handle_t));
>   (*f)->cache = cache;
>   (*f)->entry = entry;
>   entry->open_handle = *f;
> @@ -576,7 +576,7 @@ open_entry(svn__file_handle_cache__handl
>  * underlying APR file handle rendering the entry "unused".
>  */
>  static svn_error_t *
> -close_oldest_idle(svn__file_handle_cache_t *cache)
> +close_oldest_idle(svn_file_handle_cache_t *cache)
>  {
>   return cache->idle_entries.first
>     ? internal_close_file(cache, cache->idle_entries.first->item)
> @@ -587,7 +587,7 @@ close_oldest_idle(svn__file_handle_cache
>  * if there is such an entry.
>  */
>  static svn_error_t *
> -auto_close_oldest(svn__file_handle_cache_t *cache)
> +auto_close_oldest(svn_file_handle_cache_t *cache)
>  {
>   return cache->used_entries.count > cache->max_used_count
>     ? close_oldest_idle(cache)
> @@ -639,14 +639,14 @@ pointer_is_closer(const cache_entry_t *e
>  * is undefined.
>  */
>  svn_error_t *
> -svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
> -                             svn__file_handle_cache_t *cache,
> -                             const char *fname,
> -                             apr_int32_t flag,
> -                             apr_fileperms_t perm,
> -                             apr_off_t offset,
> -                             int cookie,
> -                             apr_pool_t *pool)
> +svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
> +                            svn_file_handle_cache_t *cache,
> +                            const char *fname,
> +                            apr_int32_t flag,
> +                            apr_fileperms_t perm,
> +                            apr_off_t offset,
> +                            int cookie,
> +                            apr_pool_t *pool)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
>   cache_entry_t *entry;
> @@ -728,8 +728,8 @@ svn__file_handle_cache__open(svn__file_h
>  * the respective file does not exist.
>  */
>  svn_boolean_t
> -svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache,
> -                                 const char *fname)
> +svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache,
> +                                const char *fname)
>  {
>   svn_boolean_t result = FALSE;
>
> @@ -764,7 +764,7 @@ svn__file_handle_cache__has_file(svn__fi
>  * invalidated.
>  */
>  apr_file_t *
> -svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f)
>  {
>   return (f && f->entry) ? f->entry->file : NULL;
>  }
> @@ -774,7 +774,7 @@ svn__file_handle_cache__get_apr_handle(s
>  * invalidated.
>  */
>  const char *
> -svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f)
>  {
>   return (f && f->entry) ? f->entry->name : NULL;
>  }
> @@ -783,10 +783,10 @@ svn__file_handle_cache__get_name(svn__fi
>  * of open handles, the underlying handle may actually get closed.
>  */
>  svn_error_t *
> -svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
> -  svn__file_handle_cache_t *cache = f ? f->cache : NULL;
> +  svn_file_handle_cache_t *cache = f ? f->cache : NULL;
>   cache_entry_t *entry = f ? f->entry : NULL;
>
>   /* no-op for closed or invalidated cached file handles */
> @@ -828,7 +828,7 @@ svn__file_handle_cache__close(svn__file_
>  /* Close all file handles currently not held by the application.
>  */
>  svn_error_t *
> -svn__file_handle_cache__flush(svn__file_handle_cache_t *cache)
> +svn_file_handle_cache__flush(svn_file_handle_cache_t *cache)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
>
> @@ -867,14 +867,14 @@ svn__file_handle_cache__flush(svn__file_
>  * THREAD_SAFE may be FALSE. Otherwise, it must be TRUE.
>  */
>  svn_error_t *
> -svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
> -                                     size_t max_handles,
> -                                     svn_boolean_t thread_safe,
> -                                     apr_pool_t *pool)
> +svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
> +                                    size_t max_handles,
> +                                    svn_boolean_t thread_safe,
> +                                    apr_pool_t *pool)
>  {
>   /* allocate cache header */
> -  svn__file_handle_cache_t *new_cache =
> -      (svn__file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
> +  svn_file_handle_cache_t *new_cache =
> +      (svn_file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
>
>   /* create sub-pool for all cache sub-structures */
>   new_cache->pool = svn_pool_create(pool);
>
> Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c (original)
> +++ subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c Tue Aug  3 11:41:16 2010
> @@ -58,7 +58,7 @@ typedef struct source_stack_t
>  /* Serialization context info. It basically consists of the buffer holding
>  * the serialized result and the stack of source structure information.
>  */
> -struct svn__temp_serializer__context_t
> +struct svn_temp_serializer__context_t
>  {
>   /* allocations are made from this pool */
>   apr_pool_t *pool;
> @@ -77,7 +77,7 @@ struct svn__temp_serializer__context_t
>  * guarantees.
>  */
>  static void
> -align_buffer_end(svn__temp_serializer__context_t *context)
> +align_buffer_end(svn_temp_serializer__context_t *context)
>  {
>   apr_size_t current_len = context->buffer->len;
>   apr_size_t aligned_len = APR_ALIGN_DEFAULT(current_len);
> @@ -95,11 +95,11 @@ align_buffer_end(svn__temp_serializer__c
>  * re-allocations during the serialization process. All allocations will
>  * be made from POOL.
>  */
> -svn__temp_serializer__context_t *
> -svn__temp_serializer__init(const void *source_struct,
> -                           apr_size_t struct_size,
> -                           apr_size_t suggested_buffer_size,
> -                           apr_pool_t *pool)
> +svn_temp_serializer__context_t *
> +svn_temp_serializer__init(const void *source_struct,
> +                          apr_size_t struct_size,
> +                          apr_size_t suggested_buffer_size,
> +                          apr_pool_t *pool)
>  {
>   /* select a meaningful initial memory buffer capacity */
>   apr_size_t init_size = suggested_buffer_size < struct_size
> @@ -108,8 +108,7 @@ svn__temp_serializer__init(const void *s
>
>   /* create the serialization context and initialize it, including the
>    * structure stack */
> -  svn__temp_serializer__context_t *context = apr_palloc(pool,
> -                                                        sizeof(*context));
> +  svn_temp_serializer__context_t *context = apr_palloc(pool, sizeof(*context));
>   context->pool = pool;
>   context->buffer = svn_stringbuf_create_ensure(init_size, pool);
>   context->source = apr_palloc(pool, sizeof(*context->source));
> @@ -129,7 +128,7 @@ svn__temp_serializer__init(const void *s
>  * right after this function call.
>  */
>  static void
> -store_current_end_pointer(svn__temp_serializer__context_t *context,
> +store_current_end_pointer(svn_temp_serializer__context_t *context,
>                           const void * const * source_pointer)
>  {
>   /* relative position of the serialized pointer to the begin of the buffer */
> @@ -138,8 +137,7 @@ store_current_end_pointer(svn__temp_seri
>                     + context->source->target_offset;
>
>   /* use the serialized pointer as a storage for the offset */
> -  apr_size_t *target_string_ptr =
> -    (apr_size_t*)(context->buffer->data + offset);
> +  apr_size_t *target_string_ptr = (apr_size_t*)(context->buffer->data + offset);
>
>   /* the offset must be within the serialized data. Otherwise, you forgot
>    * to serialize the respective sub-struct. */
> @@ -157,9 +155,9 @@ store_current_end_pointer(svn__temp_seri
>  * result of sizeof() of the actual structure.
>  */
>  void
> -svn__temp_serializer__push(svn__temp_serializer__context_t *context,
> -                           const void * const * source_struct,
> -                           apr_size_t struct_size)
> +svn_temp_serializer__push(svn_temp_serializer__context_t *context,
> +                          const void * const * source_struct,
> +                          apr_size_t struct_size)
>  {
>   /* create a new entry for the structure stack */
>   source_stack_t *new = apr_palloc(context->pool, sizeof(*new));
> @@ -189,7 +187,7 @@ svn__temp_serializer__push(svn__temp_ser
>  /* Remove the lastest structure from the stack.
>  */
>  void
> -svn__temp_serializer__pop(svn__temp_serializer__context_t *context)
> +svn_temp_serializer__pop(svn_temp_serializer__context_t *context)
>  {
>   /* we may pop the original struct but not further */
>   assert(context->source);
> @@ -204,8 +202,8 @@ svn__temp_serializer__pop(svn__temp_seri
>  * structure can be established.
>  */
>  void
> -svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
> -                                 const char * const * s)
> +svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
> +                                const char * const * s)
>  {
>   /* Store the offset at which the string data that will the appended.
>    * Write 0 for NULL pointers. Strings don't need special alignment. */
> @@ -220,7 +218,7 @@ svn__temp_serializer__add_string(svn__te
>  * the given serialization CONTEXT.
>  */
>  svn_stringbuf_t *
> -svn__temp_serializer__get(svn__temp_serializer__context_t *context)
> +svn_temp_serializer__get(svn_temp_serializer__context_t *context)
>  {
>   return context->buffer;
>  }
> @@ -229,7 +227,7 @@ svn__temp_serializer__get(svn__temp_seri
>  * proper pointer value.
>  */
>  void
> -svn__temp_deserializer__resolve(void *buffer, void **ptr)
> +svn_temp_deserializer__resolve(void *buffer, void **ptr)
>  {
>   if ((apr_size_t)*ptr)
>     {
>
> Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
>            ('svn:eol-style' removed)
>
>
>

Re: svn commit: r981828 - in /subversion/branches/performance/subversion: include/private/svn_file_handle_cache.h include/private/svn_temp_serializer.h libsvn_subr/svn_file_handle_cache.c libsvn_subr/svn_temp_serializer.c

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
I this is what I get for not reading the entire identifier.  I
apologize for the bad advice; I missed the second '__' farther down in
the symbol names.

-Hyrum

On Tue, Aug 3, 2010 at 6:41 AM,  <st...@apache.org> wrote:
> Author: stefan2
> Date: Tue Aug  3 11:41:16 2010
> New Revision: 981828
>
> URL: http://svn.apache.org/viewvc?rev=981828&view=rev
> Log:
> Revert r981665 because there is no such naming convention.
> I guess it is my fault when I blindly follow advise .. *sigh*
>
> Modified:
>    subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h   (contents, props changed)
>    subversion/branches/performance/subversion/include/private/svn_temp_serializer.h   (contents, props changed)
>    subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c   (contents, props changed)
>    subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c   (contents, props changed)
>
> Modified: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h (original)
> +++ subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h Tue Aug  3 11:41:16 2010
> @@ -20,7 +20,7 @@
>  * ====================================================================
>  * @endcopyright
>  *
> - * @file svn__file_handle_cache.h
> + * @file svn_file_handle_cache.h
>  * @brief File handle cache API
>  */
>
> @@ -30,14 +30,14 @@
>  /**
>  * An opaque structure representing a cache for open file handles.
>  */
> -typedef struct svn__file_handle_cache_t svn__file_handle_cache_t;
> +typedef struct svn_file_handle_cache_t svn_file_handle_cache_t;
>
>  /**
>  * An opaque structure representing a cached file handle being used
>  * by the calling application.
>  */
>  typedef
> -struct svn__file_handle_cache__handle_t svn__file_handle_cache__handle_t;
> +struct svn_file_handle_cache__handle_t svn_file_handle_cache__handle_t;
>
>  /**
>  * Get an open file handle in @a f, for the file named @a fname with the
> @@ -51,14 +51,14 @@ struct svn__file_handle_cache__handle_t
>  * returned is undefined.
>  */
>  svn_error_t *
> -svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
> -                             svn__file_handle_cache_t *cache,
> -                             const char *fname,
> -                             apr_int32_t flag,
> -                             apr_fileperms_t perm,
> -                             apr_off_t offset,
> -                             int cookie,
> -                             apr_pool_t *pool);
> +svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
> +                            svn_file_handle_cache_t *cache,
> +                            const char *fname,
> +                            apr_int32_t flag,
> +                            apr_fileperms_t perm,
> +                            apr_off_t offset,
> +                            int cookie,
> +                            apr_pool_t *pool);
>
>  /**
>  * Efficiently check whether the file handle cache @a cache holds an open
> @@ -67,8 +67,8 @@ svn__file_handle_cache__open(svn__file_h
>  * that the respective file does not exist.
>  */
>  svn_boolean_t
> -svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache,
> -                                 const char *fname);
> +svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache,
> +                                const char *fname);
>
>  /**
>  * Return the APR level file handle underlying the cache file handle @a f.
> @@ -76,7 +76,7 @@ svn__file_handle_cache__has_file(svn__fi
>  * invalidated.
>  */
>  apr_file_t *
> -svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Return the name of the file that the cached handle @a f refers to.
> @@ -84,7 +84,7 @@ svn__file_handle_cache__get_apr_handle(s
>  * invalidated.
>  */
>  const char *
> -svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Return the cached file handle @a f to the cache. Depending on the number
> @@ -92,13 +92,13 @@ svn__file_handle_cache__get_name(svn__fi
>  * is NULL, already closed or an invalidated handle, this is a no-op.
>  */
>  svn_error_t *
> -svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f);
> +svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f);
>
>  /**
>  * Close all file handles currently not held by the application.
>  */
>  svn_error_t *
> -svn__file_handle_cache__flush(svn__file_handle_cache_t *cache);
> +svn_file_handle_cache__flush(svn_file_handle_cache_t *cache);
>
>  /**
>  * Creates a new file handle cache in @a cache. Up to @a max_handles
> @@ -109,7 +109,7 @@ svn__file_handle_cache__flush(svn__file_
>  * cache, @a thread_safe may be @c FALSE. Otherwise, it must be @c TRUE.
>  */
>  svn_error_t *
> -svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
> -                                     size_t max_handles,
> -                                     svn_boolean_t thread_safe,
> -                                     apr_pool_t *pool);
> +svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
> +                                    size_t max_handles,
> +                                    svn_boolean_t thread_safe,
> +                                    apr_pool_t *pool);
>
> Propchange: subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/private/svn_temp_serializer.h?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
> +++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Tue Aug  3 11:41:16 2010
> @@ -38,8 +38,7 @@ struct svn_stringbuf_t;
>  * Opaque structure controlling the serialization process and holding the
>  * intermediate as well as final results.
>  */
> -typedef
> -struct svn__temp_serializer__context_t svn__temp_serializer__context_t;
> +typedef struct svn_temp_serializer__context_t svn_temp_serializer__context_t;
>
>  /**
>  * Begin the serialization process for the @a source_struct and all objects
> @@ -58,11 +57,11 @@ struct svn__temp_serializer__context_t s
>  *
>  * @return the serization context.
>  */
> -svn__temp_serializer__context_t *
> -svn__temp_serializer__init(const void *source_struct,
> -                           apr_size_t struct_size,
> -                           apr_size_t suggested_buffer_size,
> -                           apr_pool_t *pool);
> +svn_temp_serializer__context_t *
> +svn_temp_serializer__init(const void *source_struct,
> +                          apr_size_t struct_size,
> +                          apr_size_t suggested_buffer_size,
> +                          apr_pool_t *pool);
>
>  /**
>  * Begin serialization of a referenced sub-structure within the
> @@ -76,9 +75,9 @@ svn__temp_serializer__init(const void *s
>  * svn_serializer__pop to realign the serialization context.
>  */
>  void
> -svn__temp_serializer__push(svn__temp_serializer__context_t *context,
> -                           const void * const * source_struct,
> -                           apr_size_t struct_size);
> +svn_temp_serializer__push(svn_temp_serializer__context_t *context,
> +                          const void * const * source_struct,
> +                          apr_size_t struct_size);
>
>  /**
>  * End the serialization of the current sub-structure. The serialization
> @@ -89,7 +88,7 @@ svn__temp_serializer__push(svn__temp_ser
>  * of the serialization process.
>  */
>  void
> -svn__temp_serializer__pop(svn__temp_serializer__context_t *context);
> +svn_temp_serializer__pop(svn_temp_serializer__context_t *context);
>
>  /**
>  * Serialize a string referenced from the current structure within the
> @@ -98,15 +97,15 @@ svn__temp_serializer__pop(svn__temp_seri
>  * serialized structure can be established.
>  */
>  void
> -svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
> -                                 const char * const * s);
> +svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
> +                                const char * const * s);
>
>  /**
>  * @return a reference to the data buffer containing the data serialialized
>  * so far in the given serialization @a context.
>  */
>  struct svn_stringbuf_t *
> -svn__temp_serializer__get(svn__temp_serializer__context_t *context);
> +svn_temp_serializer__get(svn_temp_serializer__context_t *context);
>
>  /**
>  * Deserialization is straightforward: just copy the serialized buffer to
> @@ -118,4 +117,4 @@ svn__temp_serializer__get(svn__temp_seri
>  * the pointer to resolve in @a ptr.
>  */
>  void
> -svn__temp_deserializer__resolve(void *buffer, void **ptr);
> +svn_temp_deserializer__resolve(void *buffer, void **ptr);
>
> Propchange: subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c (original)
> +++ subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c Tue Aug  3 11:41:16 2010
> @@ -1,5 +1,5 @@
>  /*
> - * svn__file_handle_cache.c: open file handle caching for Subversion
> + * svn_file_handle_cache.c: open file handle caching for Subversion
>  *
>  * ====================================================================
>  *    Licensed to the Apache Software Foundation (ASF) under one
> @@ -67,7 +67,7 @@
>  * between read-after-write, write-after-read or others.
>  *
>  * For similar reasons, an application may want to close all idle handles
> - * explicitly, i.e. without opening new ones. svn__file_handle_cache__flush
> + * explicitly, i.e. without opening new ones. svn_file_handle_cache__flush
>  * is the function to call in that case.
>  */
>
> @@ -129,7 +129,7 @@ struct cache_entry_t
>
>   /* The cached file handle object handed out to the application.
>    * If this is NULL, the entry is either idle or unused. */
> -  svn__file_handle_cache__handle_t *open_handle;
> +  svn_file_handle_cache__handle_t *open_handle;
>
>   /* the file name. NULL for unused entries */
>   const char *name;
> @@ -161,7 +161,7 @@ struct cache_entry_t
>
>  /* The file handle cache structure.
>  */
> -struct svn__file_handle_cache_t
> +struct svn_file_handle_cache_t
>  {
>   /* all cache sub-structures are allocated from this pool */
>   apr_pool_t *pool;
> @@ -199,12 +199,12 @@ struct svn__file_handle_cache_t
>  * either the handle has already been returned to the cache or the cache
>  * itself has been destroyed already.
>  */
> -struct svn__file_handle_cache__handle_t
> +struct svn_file_handle_cache__handle_t
>  {
>   /* the issuing cache. Having that element here simplifies function
>    * signatures dealing with cached file handles. It also makes them
>    * harder to use incorrectly. */
> -  svn__file_handle_cache_t *cache;
> +  svn_file_handle_cache_t *cache;
>
>   /* the handle-specific information */
>   cache_entry_t *entry;
> @@ -213,7 +213,7 @@ struct svn__file_handle_cache__handle_t
>  /* If applicable, locks CACHE's mutex.
>  */
>  static svn_error_t *
> -lock_cache(svn__file_handle_cache_t *cache)
> +lock_cache(svn_file_handle_cache_t *cache)
>  {
>  #if APR_HAS_THREADS
>   apr_status_t status;
> @@ -231,7 +231,7 @@ lock_cache(svn__file_handle_cache_t *cac
>  /* If applicable, unlocks CACHE's mutex, then returns ERR.
>  */
>  static svn_error_t *
> -unlock_cache(svn__file_handle_cache_t *cache, svn_error_t *err)
> +unlock_cache(svn_file_handle_cache_t *cache, svn_error_t *err)
>  {
>  #if APR_HAS_THREADS
>   apr_status_t status;
> @@ -354,7 +354,7 @@ remove_from_list(entry_list_t *list, ent
>  * If no such entry exists, the result is NULL.
>  */
>  static cache_entry_t *
> -find_first(svn__file_handle_cache_t *cache, const char *name)
> +find_first(svn_file_handle_cache_t *cache, const char *name)
>  {
>   cache_entry_t *result =
>     (cache_entry_t *)apr_hash_get(cache->first_by_name,
> @@ -394,7 +394,7 @@ auto_close_cached_handle(void *entry_voi
>  */
>  static svn_error_t *
>  internal_file_open(cache_entry_t **result,
> -                   svn__file_handle_cache_t *cache,
> +                   svn_file_handle_cache_t *cache,
>                    const char *name,
>                    apr_int32_t flag,
>                    apr_fileperms_t perm,
> @@ -471,7 +471,7 @@ internal_file_open(cache_entry_t **resul
>  * The entry will be in "unused" state afterwards.
>  */
>  static svn_error_t *
> -internal_close_file(svn__file_handle_cache_t *cache, cache_entry_t *entry)
> +internal_close_file(svn_file_handle_cache_t *cache, cache_entry_t *entry)
>  {
>   /* any cached file handle held by the application must have either
>    * been returned or invalidated before, i.e. this entry must be "idle" */
> @@ -524,14 +524,14 @@ internal_close_file(svn__file_handle_cac
>  static apr_status_t
>  close_handle_before_cleanup(void *handle_void)
>  {
> -  svn__file_handle_cache__handle_t *f = handle_void;
> +  svn_file_handle_cache__handle_t *f = handle_void;
>   svn_error_t *err = SVN_NO_ERROR;
>
>   /* if this hasn't been done before:
>    * "close" the handle, i.e. return it to the cache
>    */
>   if (f->entry)
> -    err = svn__file_handle_cache__close(f);
> +    err = svn_file_handle_cache__close(f);
>
>   /* fully reset all members to prevent zombies doing damage */
>   f->entry = NULL;
> @@ -546,8 +546,8 @@ close_handle_before_cleanup(void *handle
>  * is cleared or destroyed.
>  */
>  static svn_error_t *
> -open_entry(svn__file_handle_cache__handle_t **f,
> -           svn__file_handle_cache_t *cache,
> +open_entry(svn_file_handle_cache__handle_t **f,
> +           svn_file_handle_cache_t *cache,
>            cache_entry_t *entry,
>            apr_pool_t *pool)
>  {
> @@ -558,7 +558,7 @@ open_entry(svn__file_handle_cache__handl
>   remove_from_list(&cache->idle_entries, &entry->idle_link);
>
>   /* create and initialize the cached file handle structure */
> -  *f = apr_palloc(pool, sizeof(svn__file_handle_cache__handle_t));
> +  *f = apr_palloc(pool, sizeof(svn_file_handle_cache__handle_t));
>   (*f)->cache = cache;
>   (*f)->entry = entry;
>   entry->open_handle = *f;
> @@ -576,7 +576,7 @@ open_entry(svn__file_handle_cache__handl
>  * underlying APR file handle rendering the entry "unused".
>  */
>  static svn_error_t *
> -close_oldest_idle(svn__file_handle_cache_t *cache)
> +close_oldest_idle(svn_file_handle_cache_t *cache)
>  {
>   return cache->idle_entries.first
>     ? internal_close_file(cache, cache->idle_entries.first->item)
> @@ -587,7 +587,7 @@ close_oldest_idle(svn__file_handle_cache
>  * if there is such an entry.
>  */
>  static svn_error_t *
> -auto_close_oldest(svn__file_handle_cache_t *cache)
> +auto_close_oldest(svn_file_handle_cache_t *cache)
>  {
>   return cache->used_entries.count > cache->max_used_count
>     ? close_oldest_idle(cache)
> @@ -639,14 +639,14 @@ pointer_is_closer(const cache_entry_t *e
>  * is undefined.
>  */
>  svn_error_t *
> -svn__file_handle_cache__open(svn__file_handle_cache__handle_t **f,
> -                             svn__file_handle_cache_t *cache,
> -                             const char *fname,
> -                             apr_int32_t flag,
> -                             apr_fileperms_t perm,
> -                             apr_off_t offset,
> -                             int cookie,
> -                             apr_pool_t *pool)
> +svn_file_handle_cache__open(svn_file_handle_cache__handle_t **f,
> +                            svn_file_handle_cache_t *cache,
> +                            const char *fname,
> +                            apr_int32_t flag,
> +                            apr_fileperms_t perm,
> +                            apr_off_t offset,
> +                            int cookie,
> +                            apr_pool_t *pool)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
>   cache_entry_t *entry;
> @@ -728,8 +728,8 @@ svn__file_handle_cache__open(svn__file_h
>  * the respective file does not exist.
>  */
>  svn_boolean_t
> -svn__file_handle_cache__has_file(svn__file_handle_cache_t *cache,
> -                                 const char *fname)
> +svn_file_handle_cache__has_file(svn_file_handle_cache_t *cache,
> +                                const char *fname)
>  {
>   svn_boolean_t result = FALSE;
>
> @@ -764,7 +764,7 @@ svn__file_handle_cache__has_file(svn__fi
>  * invalidated.
>  */
>  apr_file_t *
> -svn__file_handle_cache__get_apr_handle(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__get_apr_handle(svn_file_handle_cache__handle_t *f)
>  {
>   return (f && f->entry) ? f->entry->file : NULL;
>  }
> @@ -774,7 +774,7 @@ svn__file_handle_cache__get_apr_handle(s
>  * invalidated.
>  */
>  const char *
> -svn__file_handle_cache__get_name(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__get_name(svn_file_handle_cache__handle_t *f)
>  {
>   return (f && f->entry) ? f->entry->name : NULL;
>  }
> @@ -783,10 +783,10 @@ svn__file_handle_cache__get_name(svn__fi
>  * of open handles, the underlying handle may actually get closed.
>  */
>  svn_error_t *
> -svn__file_handle_cache__close(svn__file_handle_cache__handle_t *f)
> +svn_file_handle_cache__close(svn_file_handle_cache__handle_t *f)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
> -  svn__file_handle_cache_t *cache = f ? f->cache : NULL;
> +  svn_file_handle_cache_t *cache = f ? f->cache : NULL;
>   cache_entry_t *entry = f ? f->entry : NULL;
>
>   /* no-op for closed or invalidated cached file handles */
> @@ -828,7 +828,7 @@ svn__file_handle_cache__close(svn__file_
>  /* Close all file handles currently not held by the application.
>  */
>  svn_error_t *
> -svn__file_handle_cache__flush(svn__file_handle_cache_t *cache)
> +svn_file_handle_cache__flush(svn_file_handle_cache_t *cache)
>  {
>   svn_error_t *err = SVN_NO_ERROR;
>
> @@ -867,14 +867,14 @@ svn__file_handle_cache__flush(svn__file_
>  * THREAD_SAFE may be FALSE. Otherwise, it must be TRUE.
>  */
>  svn_error_t *
> -svn__file_handle_cache__create_cache(svn__file_handle_cache_t **cache,
> -                                     size_t max_handles,
> -                                     svn_boolean_t thread_safe,
> -                                     apr_pool_t *pool)
> +svn_file_handle_cache__create_cache(svn_file_handle_cache_t **cache,
> +                                    size_t max_handles,
> +                                    svn_boolean_t thread_safe,
> +                                    apr_pool_t *pool)
>  {
>   /* allocate cache header */
> -  svn__file_handle_cache_t *new_cache =
> -      (svn__file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
> +  svn_file_handle_cache_t *new_cache =
> +      (svn_file_handle_cache_t *)apr_palloc(pool, sizeof(*new_cache));
>
>   /* create sub-pool for all cache sub-structures */
>   new_cache->pool = svn_pool_create(pool);
>
> Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
>            ('svn:eol-style' removed)
>
> Modified: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
> URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c?rev=981828&r1=981827&r2=981828&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c (original)
> +++ subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c Tue Aug  3 11:41:16 2010
> @@ -58,7 +58,7 @@ typedef struct source_stack_t
>  /* Serialization context info. It basically consists of the buffer holding
>  * the serialized result and the stack of source structure information.
>  */
> -struct svn__temp_serializer__context_t
> +struct svn_temp_serializer__context_t
>  {
>   /* allocations are made from this pool */
>   apr_pool_t *pool;
> @@ -77,7 +77,7 @@ struct svn__temp_serializer__context_t
>  * guarantees.
>  */
>  static void
> -align_buffer_end(svn__temp_serializer__context_t *context)
> +align_buffer_end(svn_temp_serializer__context_t *context)
>  {
>   apr_size_t current_len = context->buffer->len;
>   apr_size_t aligned_len = APR_ALIGN_DEFAULT(current_len);
> @@ -95,11 +95,11 @@ align_buffer_end(svn__temp_serializer__c
>  * re-allocations during the serialization process. All allocations will
>  * be made from POOL.
>  */
> -svn__temp_serializer__context_t *
> -svn__temp_serializer__init(const void *source_struct,
> -                           apr_size_t struct_size,
> -                           apr_size_t suggested_buffer_size,
> -                           apr_pool_t *pool)
> +svn_temp_serializer__context_t *
> +svn_temp_serializer__init(const void *source_struct,
> +                          apr_size_t struct_size,
> +                          apr_size_t suggested_buffer_size,
> +                          apr_pool_t *pool)
>  {
>   /* select a meaningful initial memory buffer capacity */
>   apr_size_t init_size = suggested_buffer_size < struct_size
> @@ -108,8 +108,7 @@ svn__temp_serializer__init(const void *s
>
>   /* create the serialization context and initialize it, including the
>    * structure stack */
> -  svn__temp_serializer__context_t *context = apr_palloc(pool,
> -                                                        sizeof(*context));
> +  svn_temp_serializer__context_t *context = apr_palloc(pool, sizeof(*context));
>   context->pool = pool;
>   context->buffer = svn_stringbuf_create_ensure(init_size, pool);
>   context->source = apr_palloc(pool, sizeof(*context->source));
> @@ -129,7 +128,7 @@ svn__temp_serializer__init(const void *s
>  * right after this function call.
>  */
>  static void
> -store_current_end_pointer(svn__temp_serializer__context_t *context,
> +store_current_end_pointer(svn_temp_serializer__context_t *context,
>                           const void * const * source_pointer)
>  {
>   /* relative position of the serialized pointer to the begin of the buffer */
> @@ -138,8 +137,7 @@ store_current_end_pointer(svn__temp_seri
>                     + context->source->target_offset;
>
>   /* use the serialized pointer as a storage for the offset */
> -  apr_size_t *target_string_ptr =
> -    (apr_size_t*)(context->buffer->data + offset);
> +  apr_size_t *target_string_ptr = (apr_size_t*)(context->buffer->data + offset);
>
>   /* the offset must be within the serialized data. Otherwise, you forgot
>    * to serialize the respective sub-struct. */
> @@ -157,9 +155,9 @@ store_current_end_pointer(svn__temp_seri
>  * result of sizeof() of the actual structure.
>  */
>  void
> -svn__temp_serializer__push(svn__temp_serializer__context_t *context,
> -                           const void * const * source_struct,
> -                           apr_size_t struct_size)
> +svn_temp_serializer__push(svn_temp_serializer__context_t *context,
> +                          const void * const * source_struct,
> +                          apr_size_t struct_size)
>  {
>   /* create a new entry for the structure stack */
>   source_stack_t *new = apr_palloc(context->pool, sizeof(*new));
> @@ -189,7 +187,7 @@ svn__temp_serializer__push(svn__temp_ser
>  /* Remove the lastest structure from the stack.
>  */
>  void
> -svn__temp_serializer__pop(svn__temp_serializer__context_t *context)
> +svn_temp_serializer__pop(svn_temp_serializer__context_t *context)
>  {
>   /* we may pop the original struct but not further */
>   assert(context->source);
> @@ -204,8 +202,8 @@ svn__temp_serializer__pop(svn__temp_seri
>  * structure can be established.
>  */
>  void
> -svn__temp_serializer__add_string(svn__temp_serializer__context_t *context,
> -                                 const char * const * s)
> +svn_temp_serializer__add_string(svn_temp_serializer__context_t *context,
> +                                const char * const * s)
>  {
>   /* Store the offset at which the string data that will the appended.
>    * Write 0 for NULL pointers. Strings don't need special alignment. */
> @@ -220,7 +218,7 @@ svn__temp_serializer__add_string(svn__te
>  * the given serialization CONTEXT.
>  */
>  svn_stringbuf_t *
> -svn__temp_serializer__get(svn__temp_serializer__context_t *context)
> +svn_temp_serializer__get(svn_temp_serializer__context_t *context)
>  {
>   return context->buffer;
>  }
> @@ -229,7 +227,7 @@ svn__temp_serializer__get(svn__temp_seri
>  * proper pointer value.
>  */
>  void
> -svn__temp_deserializer__resolve(void *buffer, void **ptr)
> +svn_temp_deserializer__resolve(void *buffer, void **ptr)
>  {
>   if ((apr_size_t)*ptr)
>     {
>
> Propchange: subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
>            ('svn:eol-style' removed)
>
>
>