Skip to content

Commit b27644b

Browse files
committed
Sync typedefs.list with the buildfarm.
Our maintenance of typedefs.list has been a little haphazard (and apparently we can't alphabetize worth a darn). Replace the file with the authoritative list from our buildfarm, and run pgindent using that. I also updated the additions/exclusions lists in pgindent where necessary to keep pgindent from messing things up significantly. Notably, now that regex_t and some related names are macros not real typedefs, we have to whitelist them explicitly. The exclusions list has also drifted noticeably, presumably due to changes of system headers on the buildfarm animals that contribute to the list. Unlike in prior years, I've not manually added typedef names that are missing from the buildfarm's list because they are not used to declare any variables or fields. So there are a few places where the typedef declaration itself is formatted worse than before, e.g. typedef enum IoMethod. I could preserve the names that were manually added to the list previously, but I'd really prefer to find a less manual way of dealing with these cases. A quick grep finds about 75 such symbols, most of which have never gotten any special treatment. Per discussion among pgsql-release, doing this now seems appropriate even though we're still a week or two away from making the v18 branch.
1 parent 6d64800 commit b27644b

File tree

16 files changed

+116
-84
lines changed

16 files changed

+116
-84
lines changed

src/backend/utils/adt/mcxtfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef struct MemoryContextId
3838
{
3939
MemoryContext context;
4040
int context_id;
41-
} MemoryContextId;
41+
} MemoryContextId;
4242

4343
/*
4444
* int_list_to_array

src/include/access/heapam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ typedef struct HeapScanDescData
9696
uint32 rs_cindex; /* current tuple's index in vistuples */
9797
uint32 rs_ntuples; /* number of visible tuples on page */
9898
OffsetNumber rs_vistuples[MaxHeapTuplesPerPage]; /* their offsets */
99-
} HeapScanDescData;
99+
} HeapScanDescData;
100100
typedef struct HeapScanDescData *HeapScanDesc;
101101

102102
typedef struct BitmapHeapScanDescData

src/include/executor/nodeAgg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ typedef struct AggStatePerGroupData
264264
* NULL and not auto-replace it with a later input value. Only the first
265265
* non-NULL input will be auto-substituted.
266266
*/
267-
} AggStatePerGroupData;
267+
} AggStatePerGroupData;
268268

269269
/*
270270
* AggStatePerPhaseData - per-grouping-set-phase state

src/include/storage/aio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ typedef enum IoMethod
3636
#ifdef IOMETHOD_IO_URING_ENABLED
3737
IOMETHOD_IO_URING,
3838
#endif
39-
} IoMethod;
39+
} IoMethod;
4040

4141
/* We'll default to worker based execution. */
4242
#define DEFAULT_IO_METHOD IOMETHOD_WORKER

src/include/storage/copydir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef enum FileCopyMethod
1717
{
1818
FILE_COPY_METHOD_COPY,
1919
FILE_COPY_METHOD_CLONE,
20-
} FileCopyMethod;
20+
} FileCopyMethod;
2121

2222
/* GUC parameters */
2323
extern PGDLLIMPORT int file_copy_method;

src/include/storage/sinval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ typedef struct
119119
Oid dbId; /* database ID */
120120
Oid relid; /* relation ID, or 0 if whole
121121
* RelationSyncCache */
122-
} SharedInvalRelSyncMsg;
122+
} SharedInvalRelSyncMsg;
123123

124124
typedef union
125125
{

src/include/tcop/backend_startup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ typedef enum LogConnectionOption
8686
LOG_CONNECTION_AUTHENTICATION |
8787
LOG_CONNECTION_AUTHORIZATION |
8888
LOG_CONNECTION_SETUP_DURATIONS,
89-
} LogConnectionOption;
89+
} LogConnectionOption;
9090

9191
/*
9292
* A collection of timings of various stages of connection establishment and

src/include/utils/elog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ typedef enum
485485
PGERROR_TERSE, /* single-line error messages */
486486
PGERROR_DEFAULT, /* recommended style */
487487
PGERROR_VERBOSE, /* all the facts, ma'am */
488-
} PGErrorVerbosity;
488+
} PGErrorVerbosity;
489489

490490
extern PGDLLIMPORT int Log_error_verbosity;
491491
extern PGDLLIMPORT char *Log_line_prefix;

src/include/utils/skipsupport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ typedef struct SkipSupportData
9090
*/
9191
SkipSupportIncDec decrement;
9292
SkipSupportIncDec increment;
93-
} SkipSupportData;
93+
} SkipSupportData;
9494

9595
extern SkipSupport PrepareSkipSupportFromOpclass(Oid opfamily, Oid opcintype,
9696
bool reverse);

src/pl/plpython/plpy_cursorobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ static PyType_Slot PLyCursor_slots[] =
5858
static PyType_Spec PLyCursor_spec =
5959
{
6060
.name = "PLyCursor",
61-
.basicsize = sizeof(PLyCursorObject),
62-
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
63-
.slots = PLyCursor_slots,
61+
.basicsize = sizeof(PLyCursorObject),
62+
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
63+
.slots = PLyCursor_slots,
6464
};
6565

6666
static PyTypeObject *PLy_CursorType;

src/pl/plpython/plpy_planobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ static PyType_Slot PLyPlan_slots[] =
4545
static PyType_Spec PLyPlan_spec =
4646
{
4747
.name = "PLyPlan",
48-
.basicsize = sizeof(PLyPlanObject),
49-
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
50-
.slots = PLyPlan_slots,
48+
.basicsize = sizeof(PLyPlanObject),
49+
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
50+
.slots = PLyPlan_slots,
5151
};
5252

5353
static PyTypeObject *PLy_PlanType;

src/pl/plpython/plpy_resultobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ static PyType_Slot PLyResult_slots[] =
7070
static PyType_Spec PLyResult_spec =
7171
{
7272
.name = "PLyResult",
73-
.basicsize = sizeof(PLyResultObject),
74-
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
75-
.slots = PLyResult_slots,
73+
.basicsize = sizeof(PLyResultObject),
74+
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
75+
.slots = PLyResult_slots,
7676
};
7777

7878
static PyTypeObject *PLy_ResultType;

src/pl/plpython/plpy_subxactobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ static PyType_Slot PLySubtransaction_slots[] =
4646
static PyType_Spec PLySubtransaction_spec =
4747
{
4848
.name = "PLySubtransaction",
49-
.basicsize = sizeof(PLySubtransactionObject),
50-
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
51-
.slots = PLySubtransaction_slots,
49+
.basicsize = sizeof(PLySubtransactionObject),
50+
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
51+
.slots = PLySubtransaction_slots,
5252
};
5353

5454
static PyTypeObject *PLy_SubtransactionType;

src/test/modules/test_aio/test_aio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ typedef struct InjIoErrorState
4242

4343
bool short_read_result_set;
4444
int short_read_result;
45-
} InjIoErrorState;
45+
} InjIoErrorState;
4646

47-
static InjIoErrorState * inj_io_error_state;
47+
static InjIoErrorState *inj_io_error_state;
4848

4949
/* Shared memory init callbacks */
5050
static shmem_request_hook_type prev_shmem_request_hook = NULL;

src/tools/pgindent/pgindent

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ if ($sourcedir)
7373
# might make them so. For the moment we just hardwire a list of names
7474
# to add and a list of names to exclude; eventually this may need to be
7575
# easier to configure. Note that the typedefs need trailing newlines.
76-
my @additional = ("bool\n");
76+
my @additional = map { "$_\n" } qw(
77+
bool regex_t regmatch_t regoff
78+
);
7779

7880
my %excluded = map { +"$_\n" => 1 } qw(
79-
ANY FD_SET U abs allocfunc boolean date digit ilist interval iterator other
80-
pointer printfunc reference string timestamp type wrap
81+
FD_SET LookupSet boolean date duration
82+
element_type inquiry iterator other
83+
pointer reference rep string timestamp type wrap
8184
);
8285

8386
# globals

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