mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Add const to BufFileWrite
Make data buffer argument to BufFileWrite a const pointer and bubble this up to various callers and related APIs. This makes the APIs clearer and more consistent. Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-e168b1ce4bdb%40enterprisedb.com
This commit is contained in:
@ -38,7 +38,7 @@ static long gistBuffersGetFreeBlock(GISTBuildBuffers *gfbb);
|
||||
static void gistBuffersReleaseBlock(GISTBuildBuffers *gfbb, long blocknum);
|
||||
|
||||
static void ReadTempFileBlock(BufFile *file, long blknum, void *ptr);
|
||||
static void WriteTempFileBlock(BufFile *file, long blknum, void *ptr);
|
||||
static void WriteTempFileBlock(BufFile *file, long blknum, const void *ptr);
|
||||
|
||||
|
||||
/*
|
||||
@ -764,7 +764,7 @@ ReadTempFileBlock(BufFile *file, long blknum, void *ptr)
|
||||
}
|
||||
|
||||
static void
|
||||
WriteTempFileBlock(BufFile *file, long blknum, void *ptr)
|
||||
WriteTempFileBlock(BufFile *file, long blknum, const void *ptr)
|
||||
{
|
||||
if (BufFileSeekBlock(file, blknum) != 0)
|
||||
elog(ERROR, "could not seek to block %ld in temporary file", blknum);
|
||||
|
Reference in New Issue
Block a user