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

Commit8f67860

Browse files
committed
Avoid confusion start_parse_str function with tsearch V1
1 parent59b1a23 commit8f67860

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

‎contrib/tsearch2/wordparser/parser.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef__PARSER_H__
22
#define__PARSER_H__
33

4-
char*token;
5-
inttokenlen;
4+
externchar*token;
5+
externinttokenlen;
66
inttsearch2_yylex(void);
7-
voidstart_parse_str(char*,int);
8-
voidend_parse(void);
7+
voidtsearch2_start_parse_str(char*,int);
8+
voidtsearch2_end_parse(void);
99

1010
#endif

‎contrib/tsearch2/wordparser/parser.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#definefprintf(file, fmt, msg) ts_error(ERROR, fmt, msg)
1010

1111
char *token =NULL;/* pointer to token*/
12+
int tokenlen;
1213
char *s =NULL;/* to return WHOLE hyphenated-word*/
1314

1415
YY_BUFFER_STATE buf =NULL;/* buffer to parse; it need for parse from string*/
@@ -280,14 +281,14 @@ ftp"://" {
280281
%%
281282

282283
/* clearing after parsing from string */
283-
voidend_parse() {
284+
voidtsearch2_end_parse() {
284285
if (s) {free(s); s=NULL; }
285286
tsearch2_yy_delete_buffer( buf );
286287
buf =NULL;
287288
}
288289

289290
/* start parse from string */
290-
voidstart_parse_str(char* str,int limit) {
291+
voidtsearch2_start_parse_str(char* str,int limit) {
291292
if (buf)end_parse();
292293
buf =tsearch2_yy_scan_bytes( str, limit );
293294
tsearch2_yy_switch_to_buffer( buf );

‎contrib/tsearch2/wparser_def.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Datumprsd_start(PG_FUNCTION_ARGS);
4242
Datum
4343
prsd_start(PG_FUNCTION_ARGS)
4444
{
45-
start_parse_str((char*)PG_GETARG_POINTER(0),PG_GETARG_INT32(1));
45+
tsearch2_start_parse_str((char*)PG_GETARG_POINTER(0),PG_GETARG_INT32(1));
4646
PG_RETURN_POINTER(NULL);
4747
}
4848

@@ -67,7 +67,7 @@ Datum
6767
prsd_end(PG_FUNCTION_ARGS)
6868
{
6969
/* ParserState *p=(ParserState*)PG_GETARG_POINTER(0); */
70-
end_parse();
70+
tsearch2_end_parse();
7171
PG_RETURN_VOID();
7272
}
7373

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp