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

Commit6499008

Browse files
committed
pg_dump: Add const decorations
Add const decorations to the *info arguments of the dump* functions,to clarify that they don't modify that argument. Many other nearbyfunctions modify their arguments, so this can help clarify thesedifferent APIs a bit.Discussion:https://www.postgresql.org/message-id/flat/012d3030-9a2c-99a1-ed2d-988978b5632f%40enterprisedb.com
1 parent4ad5611 commit6499008

File tree

4 files changed

+176
-176
lines changed

4 files changed

+176
-176
lines changed

‎src/bin/pg_dump/pg_backup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ typedef int DumpId;
248248
* Function pointer prototypes for assorted callback methods.
249249
*/
250250

251-
typedefint (*DataDumperPtr) (Archive*AH,void*userArg);
251+
typedefint (*DataDumperPtr) (Archive*AH,constvoid*userArg);
252252

253253
typedefvoid (*SetupWorkerPtrType) (Archive*AH);
254254

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ struct _tocEntry
382382
intnDeps;/* number of dependencies */
383383

384384
DataDumperPtrdataDumper;/* Routine to dump data for object */
385-
void*dataDumperArg;/* Arg for above routine */
385+
constvoid*dataDumperArg;/* Arg for above routine */
386386
void*formatData;/* TOC Entry data specific to file format */
387387

388388
/* working state while dumping/restoring */
@@ -421,7 +421,7 @@ typedef struct _archiveOpts
421421
constDumpId*deps;
422422
intnDeps;
423423
DataDumperPtrdumpFn;
424-
void*dumpArg;
424+
constvoid*dumpArg;
425425
}ArchiveOpts;
426426
#defineARCHIVE_OPTS(...) &(ArchiveOpts){__VA_ARGS__}
427427
/* Called to add a TOC entry */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp