1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-09 17:03:00 +03:00

Use FLEXIBLE_ARRAY_MEMBER in struct varlena.

This forces some minor coding adjustments in tuptoaster.c and inv_api.c,
but the new coding there is cleaner anyway.

Michael Paquier
This commit is contained in:
Tom Lane
2015-02-20 16:51:53 -05:00
parent 8902f79264
commit e38b1eb098
3 changed files with 16 additions and 10 deletions

View File

@@ -391,7 +391,7 @@ typedef struct
struct varlena
{
char vl_len_[4]; /* Do not touch this field directly! */
char vl_dat[1];
char vl_dat[FLEXIBLE_ARRAY_MEMBER]; /* Data content is here */
};
#define VARHDRSZ ((int32) sizeof(int32))