blob: 4bd4483bd18fc2368ba0fee5daa5b02ccfadfd4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- 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);
|