subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1508122 - in /subversion/branches/fsx/subversion: include/svn_sorts.h libsvn_fs_x/pack.c libsvn_subr/sorts.c
Date Mon, 29 Jul 2013 16:12:58 GMT
Author: stefan2
Date: Mon Jul 29 16:12:57 2013
New Revision: 1508122

URL: http://svn.apache.org/r1508122
Log:
On the fsx-branch:  Rename svn__priority_queue_* API elements
to svn_priority_queue__*.

* subversion/include/svn_sorts.h
  (svn__priority_queue_*): rename to ...
  (svn_priority_queue__*): ... this

* subversion/libsvn_subr/sorts.c
  (): ditto

* subversion/libsvn_fs_x/pack.c
  (write_l2p_index): update API user

Modified:
    subversion/branches/fsx/subversion/include/svn_sorts.h
    subversion/branches/fsx/subversion/libsvn_fs_x/pack.c
    subversion/branches/fsx/subversion/libsvn_subr/sorts.c

Modified: subversion/branches/fsx/subversion/include/svn_sorts.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/include/svn_sorts.h?rev=1508122&r1=1508121&r2=1508122&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/include/svn_sorts.h (original)
+++ subversion/branches/fsx/subversion/include/svn_sorts.h Mon Jul 29 16:12:57 2013
@@ -218,7 +218,7 @@ svn_sort__array_reverse(apr_array_header
 
 /** Priority queues.
  *
- * @defgroup svn__priority_queue_t Priority Queues
+ * @defgroup svn_priority_queue__t Priority Queues
  * @{
  */
 
@@ -235,7 +235,7 @@ svn_sort__array_reverse(apr_array_header
 /**
  * Opaque data type for priority queues.
  */
-typedef struct svn__priority_queue_t svn__priority_queue_t;
+typedef struct svn_priority_queue__t svn_priority_queue__t;
 
 /**
  * Return a priority queue containing all provided @a elements and prioritize
@@ -245,15 +245,15 @@ typedef struct svn__priority_queue_t svn
  * storage.  So, you must not manipulate that array while using the queue.
  * Also, the lifetime of the queue is bound to that of the array.
  */
-svn__priority_queue_t *
-svn__priority_queue_create(apr_array_header_t *elements,
+svn_priority_queue__t *
+svn_priority_queue__create(apr_array_header_t *elements,
                            int (*compare_func)(const void *, const void *));
 
 /**
  * Returns the number of elements in the @a queue.
  */
 apr_size_t
-svn__priority_queue_size(svn__priority_queue_t *queue);
+svn_priority_queue__size(svn_priority_queue__t *queue);
 
 /**
  * Returns a reference to the first element in the @a queue.  The queue
@@ -261,28 +261,28 @@ svn__priority_queue_size(svn__priority_q
  * returned.
  */
 void *
-svn__priority_queue_peek(svn__priority_queue_t *queue);
+svn_priority_queue__peek(svn_priority_queue__t *queue);
 
 /**
  * Notify the @a queue after modifying the first item as returned by
- * #svn__priority_queue_peek.
+ * #svn_priority_queue__peek.
  */
 void
-svn__priority_queue_update(svn__priority_queue_t *queue);
+svn_priority_queue__update(svn_priority_queue__t *queue);
 
 /**
  * Remove the first element from the @a queue.  This is a no-op for empty
  * queues.
  */
 void
-svn__priority_queue_pop(svn__priority_queue_t *queue);
+svn_priority_queue__pop(svn_priority_queue__t *queue);
 
 /**
  * Append the new @a element to the @a queue.  @a element must neither be
- * #NULL nor the first element as returned by #svn__priority_queue_peek.
+ * #NULL nor the first element as returned by #svn_priority_queue__peek.
  */
 void
-svn__priority_queue_push(svn__priority_queue_t *queue,
+svn_priority_queue__push(svn_priority_queue__t *queue,
                          void *element);
 
 /** @} */

Modified: subversion/branches/fsx/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_fs_x/pack.c?rev=1508122&r1=1508121&r2=1508122&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/branches/fsx/subversion/libsvn_fs_x/pack.c Mon Jul 29 16:12:57 2013
@@ -1648,7 +1648,7 @@ write_l2p_index(pack_context_t *context,
   svn_revnum_t prev_rev = SVN_INVALID_REVNUM;
   int i;
   apr_uint32_t k;
-  svn__priority_queue_t *queue;
+  svn_priority_queue__t *queue;
   apr_size_t count = 0;
   apr_array_header_t *sub_item_orders;
 
@@ -1692,7 +1692,7 @@ write_l2p_index(pack_context_t *context,
     }
 
   /* we need to write the index in ascending revision order */
-  queue = svn__priority_queue_create
+  queue = svn_priority_queue__create
             (sub_item_orders,
              (int (*)(const void *, const void *))compare_p2l_info_rev);
 
@@ -1700,7 +1700,7 @@ write_l2p_index(pack_context_t *context,
   for (i = 0; i < count; ++i)
     {
       svn_fs_x__id_part_t *sub_item;
-      sub_item_ordered_t *ordered = svn__priority_queue_peek(queue);
+      sub_item_ordered_t *ordered = svn_priority_queue__peek(queue);
 
       if (ordered->entry->item_count > 0)
         {
@@ -1730,9 +1730,9 @@ write_l2p_index(pack_context_t *context,
 
       /* process remaining sub-items (if any) of that container later */
       if (ordered->entry->item_count)
-        svn__priority_queue_update(queue);
+        svn_priority_queue__update(queue);
       else
-        svn__priority_queue_pop(queue);
+        svn_priority_queue__pop(queue);
 
       /* keep memory usage in check */
       if (i % 256 == 0)

Modified: subversion/branches/fsx/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx/subversion/libsvn_subr/sorts.c?rev=1508122&r1=1508121&r2=1508122&view=diff
==============================================================================
--- subversion/branches/fsx/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/fsx/subversion/libsvn_subr/sorts.c Mon Jul 29 16:12:57 2013
@@ -311,7 +311,7 @@ svn_sort__array_reverse(apr_array_header
 /* Our priority queue data structure:
  * Simply remember the constructor parameters.
  */
-struct svn__priority_queue_t
+struct svn_priority_queue__t
 {
   /* the queue elements, ordered as a heap according to COMPARE_FUNC */
   apr_array_header_t *elements;
@@ -324,7 +324,7 @@ struct svn__priority_queue_t
  * number RHS according to QUEUE->COMPARE_FUNC
  */
 static int
-heap_is_less(svn__priority_queue_t *queue,
+heap_is_less(svn_priority_queue__t *queue,
              apr_size_t lhs,
              apr_size_t rhs)
 {
@@ -339,7 +339,7 @@ heap_is_less(svn__priority_queue_t *queu
 /* Exchange elements number LHS and RHS in QUEUE.
  */
 static void
-heap_swap(svn__priority_queue_t *queue,
+heap_swap(svn_priority_queue__t *queue,
           apr_size_t lhs,
           apr_size_t rhs)
 {
@@ -359,7 +359,7 @@ heap_swap(svn__priority_queue_t *queue,
  * fulfilled again.
  */
 static void
-heap_bubble_down(svn__priority_queue_t *queue,
+heap_bubble_down(svn_priority_queue__t *queue,
                  int idx)
 {
   while (idx > 0 && heap_is_less(queue, idx, (idx - 1) / 2))
@@ -373,7 +373,7 @@ heap_bubble_down(svn__priority_queue_t *
  * fulfilled again.
  */
 static void
-heap_bubble_up(svn__priority_queue_t *queue,
+heap_bubble_up(svn_priority_queue__t *queue,
                int idx)
 {
   while (2 * idx + 2 < queue->elements->nelts)
@@ -394,13 +394,13 @@ heap_bubble_up(svn__priority_queue_t *qu
     heap_swap(queue, 2 * idx + 1, idx);
 }
 
-svn__priority_queue_t *
-svn__priority_queue_create(apr_array_header_t *elements,
+svn_priority_queue__t *
+svn_priority_queue__create(apr_array_header_t *elements,
                            int (*compare_func)(const void *, const void *))
 {
   int i;
 
-  svn__priority_queue_t *queue = apr_pcalloc(elements->pool, sizeof(*queue));
+  svn_priority_queue__t *queue = apr_pcalloc(elements->pool, sizeof(*queue));
   queue->elements = elements;
   queue->compare_func = compare_func;
 
@@ -411,25 +411,25 @@ svn__priority_queue_create(apr_array_hea
 }
 
 apr_size_t
-svn__priority_queue_size(svn__priority_queue_t *queue)
+svn_priority_queue__size(svn_priority_queue__t *queue)
 {
   return queue->elements->nelts;
 }
 
 void *
-svn__priority_queue_peek(svn__priority_queue_t *queue)
+svn_priority_queue__peek(svn_priority_queue__t *queue)
 {
   return queue->elements->nelts ? queue->elements->elts : NULL;
 }
 
 void
-svn__priority_queue_update(svn__priority_queue_t *queue)
+svn_priority_queue__update(svn_priority_queue__t *queue)
 {
   heap_bubble_up(queue, 0);
 }
 
 void
-svn__priority_queue_pop(svn__priority_queue_t *queue)
+svn_priority_queue__pop(svn_priority_queue__t *queue)
 {
   if (queue->elements->nelts)
     {
@@ -443,7 +443,7 @@ svn__priority_queue_pop(svn__priority_qu
 }
 
 void
-svn__priority_queue_push(svn__priority_queue_t *queue,
+svn_priority_queue__push(svn_priority_queue__t *queue,
                          void *element)
 {
   /* we cannot duplicate elements due to potential array re-allocs */



Mime
View raw message