summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_bit.c
diff options
context:
space:
mode:
authorTom Lane2007-02-27 23:48:10 +0000
committerTom Lane2007-02-27 23:48:10 +0000
commit3d53833d64743d79383abfd8bee061ad2f5ec2fb (patch)
treeede671f752e430aa89c4ac0e663260b8190abd1b /contrib/btree_gist/btree_bit.c
parent9f5fadc09d4bb13b616e981486009874ae0f4e03 (diff)
Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).
Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with VARSIZE and VARDATA, and as a consequence almost no code was using the longer names. Rename the length fields of struct varlena and various derived structures to catch anyplace that was accessing them directly; and clean up various places so caught. In itself this patch doesn't change any behavior at all, but it is necessary infrastructure if we hope to play any games with the representation of varlena headers. Greg Stark and Tom Lane
Diffstat (limited to 'contrib/btree_gist/btree_bit.c')
-rw-r--r--contrib/btree_gist/btree_bit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index d8e401acfc..534c9af813 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -70,7 +70,7 @@ gbt_bit_xfrm(bytea *leaf)
int s = INTALIGN(VARBITBYTES(leaf) + VARHDRSZ);
out = palloc(s);
- VARATT_SIZEP(out) = s;
+ SET_VARSIZE(out, s);
memcpy((void *) VARDATA(out), (void *) VARBITS(leaf), VARBITBYTES(leaf));
return out;
}