You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-db/pgmecab/files/pgmecab-1.1-r3-postgres83.p...

21 lines
683 B

--- pgmecab.c.orig 2008-10-05 13:24:34.000000000 +0200
+++ pgmecab.c 2008-10-05 13:25:17.000000000 +0200
@@ -24,7 +24,7 @@
static Datum returnEmptyStr()
{
text* emptyVal = (text*) palloc(VARHDRSZ);
- VARATT_SIZEP(emptyVal) = VARHDRSZ;
+ SET_VARSIZE(emptyVal, VARHDRSZ);
PG_RETURN_TEXT_P(emptyVal);
}
@@ -90,7 +90,7 @@
/* 返すためのメモリ確保 */
text* return_val = (text *) palloc(VARHDRSZ + mecab_result_size * sizeof(char));
- VARATT_SIZEP(return_val) = VARHDRSZ + mecab_result_size * sizeof(char);
+ SET_VARSIZE(return_val, VARHDRSZ + mecab_result_size * sizeof(char));
/* 結果をコピー */
memcpy((void*)VARDATA(return_val), mecab_result, mecab_result_size);