summaryrefslogtreecommitdiff
path: root/src/include/nodes/subscripting.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-15 10:48:30 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-15 11:04:10 +0200
commitd4d1fc527bdb333d818038081c17ed7d9b1697c1 (patch)
tree3f5c4823780c7581fbcd083477d07f96fefd63a1 /src/include/nodes/subscripting.h
parent70407d39b7ea8fd41496489b5f6a30c285e7d7d0 (diff)
Update various forward declarations to use typedef
There are a number of forward declarations that use struct but not the customary typedef, because that could have led to repeat typedefs, which was not allowed. This is now allowed in C11, so we can update these to provide the typedefs as well, so that the later uses of the types look more consistent. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/10d32190-f31b-40a5-b177-11db55597355@eisentraut.org
Diffstat (limited to 'src/include/nodes/subscripting.h')
-rw-r--r--src/include/nodes/subscripting.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/include/nodes/subscripting.h b/src/include/nodes/subscripting.h
index 234e8ad8012..e991f4bf826 100644
--- a/src/include/nodes/subscripting.h
+++ b/src/include/nodes/subscripting.h
@@ -15,10 +15,10 @@
#include "nodes/primnodes.h"
-/* Forward declarations, to avoid including other headers */
-struct ParseState;
-struct SubscriptingRefState;
-struct SubscriptExecSteps;
+/* to avoid including other headers */
+typedef struct ParseState ParseState;
+typedef struct SubscriptingRefState SubscriptingRefState;
+typedef struct SubscriptExecSteps SubscriptExecSteps;
/*
* The SQL-visible function that defines a subscripting method is declared
@@ -94,7 +94,7 @@ struct SubscriptExecSteps;
*/
typedef void (*SubscriptTransform) (SubscriptingRef *sbsref,
List *indirection,
- struct ParseState *pstate,
+ ParseState *pstate,
bool isSlice,
bool isAssignment);
@@ -151,8 +151,8 @@ typedef void (*SubscriptTransform) (SubscriptingRef *sbsref,
* Set the relevant pointers to NULL for any omitted methods.
*/
typedef void (*SubscriptExecSetup) (const SubscriptingRef *sbsref,
- struct SubscriptingRefState *sbsrefstate,
- struct SubscriptExecSteps *methods);
+ SubscriptingRefState *sbsrefstate,
+ SubscriptExecSteps *methods);
/* Struct returned by the SQL-visible subscript handler function */
typedef struct SubscriptRoutines