summaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_tool.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/intarray/_int_tool.c')
-rw-r--r--contrib/intarray/_int_tool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/intarray/_int_tool.c b/contrib/intarray/_int_tool.c
index 2ad0ef0cc04..fead4ff30dc 100644
--- a/contrib/intarray/_int_tool.c
+++ b/contrib/intarray/_int_tool.c
@@ -226,7 +226,7 @@ new_intArrayType(int num)
r = (ArrayType *) palloc0(nbytes);
- ARR_SIZE(r) = nbytes;
+ SET_VARSIZE(r, nbytes);
ARR_NDIM(r) = NDIM;
r->dataoffset = 0; /* marker for no null bitmap */
ARR_ELEMTYPE(r) = INT4OID;
@@ -246,7 +246,7 @@ resize_intArrayType(ArrayType *a, int num)
a = (ArrayType *) repalloc(a, nbytes);
- a->size = nbytes;
+ SET_VARSIZE(a, nbytes);
*((int *) ARR_DIMS(a)) = num;
return a;
}