*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.4 2007/09/10 20:27:12 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.5 2007/09/11 12:57:05 teodor Exp $
*
*-------------------------------------------------------------------------
*/
if (!nchar)
return NULL;
- rs = (SPNode *) palloc0(SPNHRDSZ + nchar * sizeof(SPNodeData));
+ rs = (SPNode *) palloc0(SPNHDRSZ + nchar * sizeof(SPNodeData));
rs->length = nchar;
data = rs->data;
*
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.2 2007/08/25 00:03:59 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.3 2007/09/11 12:57:05 teodor Exp $
*
*-------------------------------------------------------------------------
*/
SPNodeData data[1];
} SPNode;
-#define SPNHRDSZ (sizeof(uint32))
+#define SPNHDRSZ (offsetof(SPNode,data))
typedef struct spell_struct
AffixNodeData data[1];
} AffixNode;
-#define ANHRDSZ (sizeof(uint32))
+#define ANHRDSZ (offsetof(AffixNode, data))
typedef struct
{