diff options
Diffstat (limited to 'src/tutorial/funcs.c')
-rw-r--r-- | src/tutorial/funcs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tutorial/funcs.c b/src/tutorial/funcs.c index 9a83e6438c..28f9c5e297 100644 --- a/src/tutorial/funcs.c +++ b/src/tutorial/funcs.c @@ -71,7 +71,7 @@ copytext(text *t) */ text *new_t = (text *) palloc(VARSIZE(t)); - VARATT_SIZEP(new_t) = VARSIZE(t); + SET_VARSIZE(new_t, VARSIZE(t)); /* * VARDATA is a pointer to the data region of the struct. @@ -90,7 +90,7 @@ concat_text(text *arg1, text *arg2) int32 new_text_size = arg1_size + arg2_size + VARHDRSZ; text *new_text = (text *) palloc(new_text_size); - VARATT_SIZEP(new_text) = new_text_size; + SET_VARSIZE(new_text, new_text_size); memcpy(VARDATA(new_text), VARDATA(arg1), arg1_size); memcpy(VARDATA(new_text) + arg1_size, VARDATA(arg2), arg2_size); return new_text; |