mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Add static assertion ensuring sizeof(ExprEvalStep) <= 64 bytes
This was previously only documented in a comment. Given the size of the struct, it's not hard to miss that comment. As evidenced by the commits leading up tofe3caa1439
,67b26703b4
. It's possible, but not likely, that we might have to weaken these assertions on a less commonly used architecture. Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/295606.1677101684@sss.pgh.pa.us
This commit is contained in:
@ -669,6 +669,10 @@ typedef struct ExprEvalStep
|
|||||||
} d;
|
} d;
|
||||||
} ExprEvalStep;
|
} ExprEvalStep;
|
||||||
|
|
||||||
|
/* Enforce the size rule given in the comment above */
|
||||||
|
StaticAssertDecl(sizeof(ExprEvalStep) <= 64,
|
||||||
|
"size of ExprEvalStep exceeds 64 bytes");
|
||||||
|
|
||||||
|
|
||||||
/* Non-inline data for container operations */
|
/* Non-inline data for container operations */
|
||||||
typedef struct SubscriptingRefState
|
typedef struct SubscriptingRefState
|
||||||
|
Reference in New Issue
Block a user