1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Mark argument of RegisterCustomRmgr() as const.

This commit is contained in:
Jeff Davis
2022-11-15 15:58:12 -08:00
parent ae168c794f
commit 1eda3ce802
4 changed files with 4 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ RmgrNotFound(RmgrId rmid)
* reserving a new ID.
*/
void
RegisterCustomRmgr(RmgrId rmid, RmgrData *rmgr)
RegisterCustomRmgr(RmgrId rmid, const RmgrData *rmgr)
{
if (rmgr->rm_name == NULL || strlen(rmgr->rm_name) == 0)
ereport(ERROR, (errmsg("custom resource manager name is invalid"),

View File

@@ -362,7 +362,7 @@ extern PGDLLIMPORT RmgrData RmgrTable[];
extern void RmgrStartup(void);
extern void RmgrCleanup(void);
extern void RmgrNotFound(RmgrId rmid);
extern void RegisterCustomRmgr(RmgrId rmid, RmgrData *rmgr);
extern void RegisterCustomRmgr(RmgrId rmid, const RmgrData *rmgr);
#ifndef FRONTEND
static inline bool

View File

@@ -51,7 +51,7 @@ void testcustomrmgrs_redo(XLogReaderState *record);
void testcustomrmgrs_desc(StringInfo buf, XLogReaderState *record);
const char *testcustomrmgrs_identify(uint8 info);
static RmgrData testcustomrmgrs_rmgr = {
static const RmgrData testcustomrmgrs_rmgr = {
.rm_name = TESTCUSTOMRMGRS_NAME,
.rm_redo = testcustomrmgrs_redo,
.rm_desc = testcustomrmgrs_desc,