Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13553cb

Browse files
committed
Fix header's size of structs defines in ispell.
Backpatch is needed for contrib version.
1 parent64def09 commit13553cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎src/backend/tsearch/spell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.4 2007/09/10 20:27:12 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.5 2007/09/11 12:57:05 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -896,7 +896,7 @@ mkSPNode(IspellDict * Conf, int low, int high, int level)
896896
if (!nchar)
897897
returnNULL;
898898

899-
rs= (SPNode*)palloc0(SPNHRDSZ+nchar*sizeof(SPNodeData));
899+
rs= (SPNode*)palloc0(SPNHDRSZ+nchar*sizeof(SPNodeData));
900900
rs->length=nchar;
901901
data=rs->data;
902902

‎src/include/tsearch/dicts/spell.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
*
9-
* $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.2 2007/08/25 00:03:59 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/tsearch/dicts/spell.h,v 1.3 2007/09/11 12:57:05 teodor Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -52,7 +52,7 @@ typedef struct SPNode
5252
SPNodeDatadata[1];
5353
}SPNode;
5454

55-
#defineSPNHRDSZ(sizeof(uint32))
55+
#defineSPNHDRSZ(offsetof(SPNode,data))
5656

5757

5858
typedefstructspell_struct
@@ -123,7 +123,7 @@ typedef struct AffixNode
123123
AffixNodeDatadata[1];
124124
}AffixNode;
125125

126-
#defineANHRDSZ (sizeof(uint32))
126+
#defineANHRDSZ (offsetof(AffixNode, data))
127127

128128
typedefstruct
129129
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp