blob: 30d2e87a8e2f3f1e8e144599dea1f85707f23b3c (
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_VARLENA_LEN(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_VARLENA_LEN(return_val, VARHDRSZ + mecab_result_size * sizeof(char));
/* ��̤ԡ� */
memcpy((void*)VARDATA(return_val), mecab_result, mecab_result_size);
|