Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd463aa0

Browse files
committed
Rename JsonManifestParseContext callbacks.
There is no real reason to just run multiple words together whenwe 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 parent4d0cf0b commitd463aa0

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
structJsonManifestParseContext;
2222
typedefstructJsonManifestParseContextJsonManifestParseContext;
2323

24-
typedefvoid (*json_manifest_perfile_callback) (JsonManifestParseContext*,
25-
char*pathname,
26-
size_tsize,pg_checksum_typechecksum_type,
27-
intchecksum_length,uint8*checksum_payload);
28-
typedefvoid (*json_manifest_perwalrange_callback) (JsonManifestParseContext*,
29-
TimeLineIDtli,
30-
XLogRecPtrstart_lsn,XLogRecPtrend_lsn);
24+
typedefvoid (*json_manifest_per_file_callback) (JsonManifestParseContext*,
25+
char*pathname,
26+
size_tsize,pg_checksum_typechecksum_type,
27+
intchecksum_length,uint8*checksum_payload);
28+
typedefvoid (*json_manifest_per_wal_range_callback) (JsonManifestParseContext*,
29+
TimeLineIDtli,
30+
XLogRecPtrstart_lsn,XLogRecPtrend_lsn);
3131
typedefvoid (*json_manifest_error_callback) (JsonManifestParseContext*,
3232
constchar*fmt,...)pg_attribute_printf(2,3)
3333
pg_attribute_noreturn();
3434

3535
structJsonManifestParseContext
3636
{
3737
void*private_data;
38-
json_manifest_perfile_callbackperfile_cb;
39-
json_manifest_perwalrange_callbackperwalrange_cb;
38+
json_manifest_per_file_callbackper_file_cb;
39+
json_manifest_per_wal_range_callbackper_wal_range_cb;
4040
json_manifest_error_callbackerror_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)

[8]ページ先頭

©2009-2025 Movatter.jp