diff options
| author | Andres Freund | 2019-08-16 17:33:30 +0000 |
|---|---|---|
| committer | Andres Freund | 2019-08-16 17:33:30 +0000 |
| commit | 6a04d345fd8094058f08344af93022566222733a (patch) | |
| tree | fabb1732489fba84b09da72a7330b403bb886141 /src/include/utils | |
| parent | 0ae2dc4db2ae9940ab2bb1e4f4c0ff27f09f8aae (diff) | |
Don't include utils/array.h from acl.h.
For most uses of acl.h the details of how "Acl" internally looks like
are irrelevant. It might make sense to move a lot of the
implementation details into a separate header at a later point.
The main motivation of this change is to avoid including fmgr.h (via
array.h, which needs it for exposed structs) in a lot of files that
otherwise don't need it. A subsequent commit will remove the fmgr.h
include from a lot of files.
Directly include utils/array.h and utils/expandeddatum.h from the
files that need them, but previously included them indirectly, via
acl.h.
Author: Andres Freund
Discussion: https://postgr.es/m/20190803193733.g3l3x3o42uv4qj7l@alap3.anarazel.de
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/acl.h | 3 | ||||
| -rw-r--r-- | src/include/utils/array.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index f4c160ee723..b99da737283 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -35,7 +35,6 @@ #include "access/htup.h" #include "nodes/parsenodes.h" #include "parser/parse_node.h" -#include "utils/array.h" #include "utils/snapshot.h" @@ -104,7 +103,7 @@ typedef struct AclItem /* * Acl a one-dimensional array of AclItem */ -typedef ArrayType Acl; +typedef struct ArrayType Acl; #define ACL_NUM(ACL) (ARR_DIMS(ACL)[0]) #define ACL_DAT(ACL) ((AclItem *) ARR_DATA_PTR(ACL)) diff --git a/src/include/utils/array.h b/src/include/utils/array.h index b441eb452b9..5cfafe00457 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -77,7 +77,7 @@ struct ExprContext; * CAUTION: if you change the header for ordinary arrays you will also * need to change the headers for oidvector and int2vector! */ -typedef struct +typedef struct ArrayType { int32 vl_len_; /* varlena header (do not touch directly!) */ int ndim; /* # of dimensions */ |
