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
commit234a02b2a888cacc4c09363cc1411ae4eac9bb51 (patch)
tree4aadb74b5d7bbcfc3cdae9c8703eac168d6108ae /contrib/btree_gist/btree_bit.c
parent0459b591fc90b197ed31923b170c658cc30758d5 (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 d8e401acfcf..534c9af8131 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;
}