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/02 21:37:00 UTC
svn commit: r981665 - 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: Mon Aug 2 19:36:59 2010
New Revision: 981665
URL: http://svn.apache.org/viewvc?rev=981665&view=rev
Log:
Rename all svn_* in include/private to svn__* as requested in
http://svn.haxx.se/dev/archive-2010-08/0043.shtml
* subversion/include/private/svn_file_handle_cache.h
(svn_*): rename to svn__*
* subversion/include/private/svn_temp_serializer.h
(svn_*): rename to svn__*
* subversion/libsvn_subr/svn_file_handle_cache.c
(svn_*): rename to svn__*
(lock_cache, unlock_cache, find_first, internal_file_open, internal_close_file,
open_entry, close_oldest_idle, auto_close_oldest): adapt signatures
(close_handle_before_cleanup): adapt implementation
* subversion/libsvn_subr/svn_temp_serializer.c
(svn_*): rename to svn__*
Modified:
subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
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=981665&r1=981664&r2=981665&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 Mon Aug 2 19:36:59 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 s
* 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_han
* 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_file
* 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(sv
* 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_file
* 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_ha
* 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);
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=981665&r1=981664&r2=981665&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Mon Aug 2 19:36:59 2010
@@ -38,7 +38,8 @@ 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
@@ -57,11 +58,11 @@ typedef struct svn_temp_serializer__cont
*
* @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
@@ -75,9 +76,9 @@ svn_temp_serializer__init(const void *so
* 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
@@ -88,7 +89,7 @@ svn_temp_serializer__push(svn_temp_seria
* 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
@@ -97,15 +98,15 @@ svn_temp_serializer__pop(svn_temp_serial
* 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
@@ -117,4 +118,4 @@ svn_temp_serializer__get(svn_temp_serial
* the pointer to resolve in @a ptr.
*/
void
-svn_temp_deserializer__resolve(void *buffer, void **ptr);
+svn__temp_deserializer__resolve(void *buffer, void **ptr);
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=981665&r1=981664&r2=981665&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 Mon Aug 2 19:36:59 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 *cach
/* 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_cach
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__handle
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__handle
* 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_han
* 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_file
* 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(sv
* 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_file
* 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_ha
/* 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_ha
* 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);
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=981665&r1=981664&r2=981665&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c Mon Aug 2 19:36:59 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__co
* 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,7 +108,8 @@ svn_temp_serializer__init(const void *so
/* 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));
@@ -128,7 +129,7 @@ svn_temp_serializer__init(const void *so
* 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 */
@@ -137,7 +138,8 @@ store_current_end_pointer(svn_temp_seria
+ 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. */
@@ -155,9 +157,9 @@ store_current_end_pointer(svn_temp_seria
* 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));
@@ -187,7 +189,7 @@ svn_temp_serializer__push(svn_temp_seria
/* 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);
@@ -202,8 +204,8 @@ svn_temp_serializer__pop(svn_temp_serial
* 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. */
@@ -218,7 +220,7 @@ svn_temp_serializer__add_string(svn_temp
* 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;
}
@@ -227,7 +229,7 @@ svn_temp_serializer__get(svn_temp_serial
* 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)
{
Re: svn commit: r981665 - 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 Kamesh Jayachandran <ka...@collab.net>.
On 08/03/2010 01:07 AM, stefan2@apache.org wrote:
> Author: stefan2
> Date: Mon Aug 2 19:36:59 2010
> New Revision: 981665
>
> URL: http://svn.apache.org/viewvc?rev=981665&view=rev
> Log:
> Rename all svn_* in include/private to svn__* as requested in
> http://svn.haxx.se/dev/archive-2010-08/0043.shtml
>
> * subversion/include/private/svn_file_handle_cache.h
> (svn_*): rename to svn__*
> * subversion/include/private/svn_temp_serializer.h
> (svn_*): rename to svn__*
>
> * subversion/libsvn_subr/svn_file_handle_cache.c
> (svn_*): rename to svn__*
> (lock_cache, unlock_cache, find_first, internal_file_open, internal_close_file,
> open_entry, close_oldest_idle, auto_close_oldest): adapt signatures
> (close_handle_before_cleanup): adapt implementation
> * subversion/libsvn_subr/svn_temp_serializer.c
> (svn_*): rename to svn__*
>
> Modified:
> subversion/branches/performance/subversion/include/private/svn_file_handle_cache.h
> subversion/branches/performance/subversion/include/private/svn_temp_serializer.h
> subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
> subversion/branches/performance/subversion/libsvn_subr/svn_temp_serializer.c
>
> 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=981665&r1=981664&r2=981665&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 Mon Aug 2 19:36:59 2010
> @@ -20,7 +20,7 @@
> * ====================================================================
> * @endcopyright
> *
> - * @file svn_file_handle_cache.h
> + * @file svn__file_handle_cache.h
>
I guess it is a find and replace error. I mean file name still remains same.
> * @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;
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * 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 s
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * Efficiently check whether the file handle cache @a cache holds an open
> @@ -67,8 +67,8 @@ svn_file_handle_cache__open(svn_file_han
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * Return the APR level file handle underlying the cache file handle @a f.
> @@ -76,7 +76,7 @@ svn_file_handle_cache__has_file(svn_file
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * 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(sv
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * 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_file
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * 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_ha
> * 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);
>
>
having '__' in two places in an identifier looks bit odd.
> 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=981665&r1=981664&r2=981665&view=diff
> ==============================================================================
> --- subversion/branches/performance/subversion/include/private/svn_temp_serializer.h (original)
> +++ subversion/branches/performance/subversion/include/private/svn_temp_serializer.h Mon Aug 2 19:36:59 2010
> @@ -38,7 +38,8 @@ 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;
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * Begin the serialization process for the @a source_struct and all objects
> @@ -57,11 +58,11 @@ typedef struct svn_temp_serializer__cont
> *
> * @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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * Begin serialization of a referenced sub-structure within the
> @@ -75,9 +76,9 @@ svn_temp_serializer__init(const void *so
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * End the serialization of the current sub-structure. The serialization
> @@ -88,7 +89,7 @@ svn_temp_serializer__push(svn_temp_seria
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * Serialize a string referenced from the current structure within the
> @@ -97,15 +98,15 @@ svn_temp_serializer__pop(svn_temp_serial
> * 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);
>
having '__' in two places in an identifier looks bit odd.
>
> /**
> * @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);
>
>
having '__' in two places in an identifier looks bit odd.
> /**
> * Deserialization is straightforward: just copy the serialized buffer to
> @@ -117,4 +118,4 @@ svn_temp_serializer__get(svn_temp_serial
> * the pointer to resolve in @a ptr.
> */
> void
> -svn_temp_deserializer__resolve(void *buffer, void **ptr);
> +svn__temp_deserializer__resolve(void *buffer, void **ptr);
>
having '__' in two places in an identifier looks bit odd.
> 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=981665&r1=981664&r2=981665&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 Mon Aug 2 19:36:59 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
> *
>
I guess it is a find and replace error. I mean file name still remains same.
Thanks
With regards
Kamesh Jayachandran