From 81fc3e28e383d9a21843a5ab845a1bd1a1042e12 Mon Sep 17 00:00:00 2001 From: Álvaro Herrera Date: Thu, 25 Sep 2025 14:33:19 +0200 Subject: Update some more forward declarations to use typedef As commit d4d1fc527bdb. Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/202509191025.22agk3fvpilc@alvherre.pgsql --- src/include/access/amapi.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/include/access/amapi.h') diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index 70949de56ac..2b4482dc1e6 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -21,11 +21,11 @@ * AM's implementation isn't concerned with those data structures. To allow * declaring amcostestimate_function here, use forward struct references. */ -struct PlannerInfo; -struct IndexPath; +typedef struct PlannerInfo PlannerInfo; +typedef struct IndexPath IndexPath; /* Likewise, this file shouldn't depend on execnodes.h. */ -struct IndexInfo; +typedef struct IndexInfo IndexInfo; /* @@ -110,7 +110,7 @@ typedef StrategyNumber (*amtranslate_cmptype_function) (CompareType cmptype, Oid /* build new index */ typedef IndexBuildResult *(*ambuild_function) (Relation heapRelation, Relation indexRelation, - struct IndexInfo *indexInfo); + IndexInfo *indexInfo); /* build empty index */ typedef void (*ambuildempty_function) (Relation indexRelation); @@ -123,11 +123,11 @@ typedef bool (*aminsert_function) (Relation indexRelation, Relation heapRelation, IndexUniqueCheck checkUnique, bool indexUnchanged, - struct IndexInfo *indexInfo); + IndexInfo *indexInfo); /* cleanup after insert */ typedef void (*aminsertcleanup_function) (Relation indexRelation, - struct IndexInfo *indexInfo); + IndexInfo *indexInfo); /* bulk delete */ typedef IndexBulkDeleteResult *(*ambulkdelete_function) (IndexVacuumInfo *info, @@ -143,8 +143,8 @@ typedef IndexBulkDeleteResult *(*amvacuumcleanup_function) (IndexVacuumInfo *inf typedef bool (*amcanreturn_function) (Relation indexRelation, int attno); /* estimate cost of an indexscan */ -typedef void (*amcostestimate_function) (struct PlannerInfo *root, - struct IndexPath *path, +typedef void (*amcostestimate_function) (PlannerInfo *root, + IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, -- cgit v1.2.3