Skip to content

Commit 4012acf

Browse files
committed
improve comments and declarations in rangeset.c
1 parent 25cff80 commit 4012acf

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/rangeset.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
#include "rangeset.h"
1212

1313

14+
static IndexRange irange_handle_cover_internal(IndexRange ir_covering,
15+
IndexRange ir_inner,
16+
List **new_iranges);
17+
18+
static IndexRange irange_union_internal(IndexRange first,
19+
IndexRange second,
20+
List **new_iranges);
21+
22+
1423
/* Check if two ranges intersect */
1524
bool
1625
iranges_intersect(IndexRange a, IndexRange b)
@@ -175,13 +184,13 @@ irange_union_internal(IndexRange first,
175184
/* range 'first' covers 'second' */
176185
if (irange_eq_bounds(ir_union, first))
177186
{
178-
/* Save rightmost IndexRange to 'ret' */
187+
/* Return rightmost IndexRange, save others to 'new_iranges' */
179188
return irange_handle_cover_internal(first, second, new_iranges);
180189
}
181190
/* range 'second' covers 'first' */
182191
else if (irange_eq_bounds(ir_union, second))
183192
{
184-
/* Save rightmost IndexRange to 'ret' */
193+
/* Retun rightmost IndexRange, save others to 'new_iranges' */
185194
return irange_handle_cover_internal(second, first, new_iranges);
186195
}
187196
/* No obvious leader, lossiness differs */
@@ -242,9 +251,7 @@ irange_union_internal(IndexRange first,
242251
}
243252
}
244253

245-
/*
246-
* Make union of two index rage lists.
247-
*/
254+
/* Make union of two index rage lists */
248255
List *
249256
irange_list_union(List *a, List *b)
250257
{
@@ -307,9 +314,7 @@ irange_list_union(List *a, List *b)
307314
return result;
308315
}
309316

310-
/*
311-
* Find intersection of two range lists.
312-
*/
317+
/* Find intersection of two range lists */
313318
List *
314319
irange_list_intersection(List *a, List *b)
315320
{

src/rangeset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* IndexRange contains a set of selected partitions.
2121
*/
2222
typedef struct {
23-
/* lossy == should we use IndexScan? */
23+
/* lossy == should we use quals? */
2424
/* valid == is this IndexRange valid? */
2525

26-
/* Don't swap this fields */
26+
/* Don't swap these fields */
2727
uint32 lower; /* valid + lower_bound */
2828
uint32 upper; /* lossy + upper_bound */
2929
} IndexRange;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy