Skip to content

Commit d463aa0

Browse files
committed
Rename JsonManifestParseContext callbacks.
There is no real reason to just run multiple words together when we can instead punctuate them with marks intended for that purpose. Per suggestion from Álvaro Herrera. Discussion: http://postgr.es/m/202311161021.nisg7imt7kyf@alvherre.pgsql
1 parent 4d0cf0b commit d463aa0

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

src/bin/pg_verifybackup/parse_manifest.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static bool parse_xlogrecptr(XLogRecPtr *result, char *input);
112112
*
113113
* Caller should set up the parsing context and then invoke this function.
114114
* For each file whose information is extracted from the manifest,
115-
* context->perfile_cb is invoked. In case of trouble, context->error_cb is
115+
* context->per_file_cb is invoked. In case of trouble, context->error_cb is
116116
* invoked and is expected not to return.
117117
*/
118118
void
@@ -545,8 +545,8 @@ json_manifest_finalize_file(JsonManifestParseState *parse)
545545
}
546546

547547
/* Invoke the callback with the details we've gathered. */
548-
context->perfile_cb(context, parse->pathname, size,
549-
checksum_type, checksum_length, checksum_payload);
548+
context->per_file_cb(context, parse->pathname, size,
549+
checksum_type, checksum_length, checksum_payload);
550550

551551
/* Free memory we no longer need. */
552552
if (parse->size != NULL)
@@ -602,7 +602,7 @@ json_manifest_finalize_wal_range(JsonManifestParseState *parse)
602602
"could not parse end LSN");
603603

604604
/* Invoke the callback with the details we've gathered. */
605-
context->perwalrange_cb(context, tli, start_lsn, end_lsn);
605+
context->per_wal_range_cb(context, tli, start_lsn, end_lsn);
606606

607607
/* Free memory we no longer need. */
608608
if (parse->timeline != NULL)

src/bin/pg_verifybackup/parse_manifest.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@
2121
struct JsonManifestParseContext;
2222
typedef struct JsonManifestParseContext JsonManifestParseContext;
2323

24-
typedef void (*json_manifest_perfile_callback) (JsonManifestParseContext *,
25-
char *pathname,
26-
size_t size, pg_checksum_type checksum_type,
27-
int checksum_length, uint8 *checksum_payload);
28-
typedef void (*json_manifest_perwalrange_callback) (JsonManifestParseContext *,
29-
TimeLineID tli,
30-
XLogRecPtr start_lsn, XLogRecPtr end_lsn);
24+
typedef void (*json_manifest_per_file_callback) (JsonManifestParseContext *,
25+
char *pathname,
26+
size_t size, pg_checksum_type checksum_type,
27+
int checksum_length, uint8 *checksum_payload);
28+
typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *,
29+
TimeLineID tli,
30+
XLogRecPtr start_lsn, XLogRecPtr end_lsn);
3131
typedef void (*json_manifest_error_callback) (JsonManifestParseContext *,
3232
const char *fmt,...) pg_attribute_printf(2, 3)
3333
pg_attribute_noreturn();
3434

3535
struct JsonManifestParseContext
3636
{
3737
void *private_data;
38-
json_manifest_perfile_callback perfile_cb;
39-
json_manifest_perwalrange_callback perwalrange_cb;
38+
json_manifest_per_file_callback per_file_cb;
39+
json_manifest_per_wal_range_callback per_wal_range_cb;
4040
json_manifest_error_callback error_cb;
4141
};
4242

src/bin/pg_verifybackup/pg_verifybackup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ parse_manifest_file(char *manifest_path, manifest_files_hash **ht_p,
440440
private_context.first_wal_range = NULL;
441441
private_context.last_wal_range = NULL;
442442
context.private_data = &private_context;
443-
context.perfile_cb = record_manifest_details_for_file;
444-
context.perwalrange_cb = record_manifest_details_for_wal_range;
443+
context.per_file_cb = record_manifest_details_for_file;
444+
context.per_wal_range_cb = record_manifest_details_for_wal_range;
445445
context.error_cb = report_manifest_error;
446446
json_parse_manifest(&context, buffer, statbuf.st_size);
447447

src/tools/pgindent/typedefs.list

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,8 +3445,8 @@ jmp_buf
34453445
join_search_hook_type
34463446
json_aelem_action
34473447
json_manifest_error_callback
3448-
json_manifest_perfile_callback
3449-
json_manifest_perwalrange_callback
3448+
json_manifest_per_file_callback
3449+
json_manifest_per_wal_range_callback
34503450
json_ofield_action
34513451
json_scalar_action
34523452
json_struct_action

0 commit comments

Comments
 (0)