Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
8f678600
Commit
8f678600
authored
21 years ago
by
Teodor Sigaev
Browse files
Options
Downloads
Patches
Plain Diff
Avoid confusion start_parse_str function with tsearch V1
parent
59b1a230
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
contrib/tsearch2/wordparser/parser.h
+4
-4
4 additions, 4 deletions
contrib/tsearch2/wordparser/parser.h
contrib/tsearch2/wordparser/parser.l
+3
-2
3 additions, 2 deletions
contrib/tsearch2/wordparser/parser.l
contrib/tsearch2/wparser_def.c
+2
-2
2 additions, 2 deletions
contrib/tsearch2/wparser_def.c
with
9 additions
and
8 deletions
contrib/tsearch2/wordparser/parser.h
+
4
−
4
View file @
8f678600
#ifndef __PARSER_H__
#define __PARSER_H__
char
*
token
;
int
tokenlen
;
extern
char
*
token
;
extern
int
tokenlen
;
int
tsearch2_yylex
(
void
);
void
start_parse_str
(
char
*
,
int
);
void
end_parse
(
void
);
void
tsearch2_
start_parse_str
(
char
*
,
int
);
void
tsearch2_
end_parse
(
void
);
#endif
This diff is collapsed.
Click to expand it.
contrib/tsearch2/wordparser/parser.l
+
3
−
2
View file @
8f678600
...
...
@@ -9,6 +9,7 @@
#define fprintf(file, fmt, msg) ts_error(ERROR, fmt, msg)
char *token = NULL; /* pointer to token */
int tokenlen;
char *s = NULL; /* to return WHOLE hyphenated-word */
YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */
...
...
@@ -280,14 +281,14 @@ ftp"://" {
%%
/* clearing after parsing from string */
void end_parse() {
void
tsearch2_
end_parse() {
if (s) { free(s); s=NULL; }
tsearch2_yy_delete_buffer( buf );
buf = NULL;
}
/* start parse from string */
void start_parse_str(char* str, int limit) {
void
tsearch2_
start_parse_str(char* str, int limit) {
if (buf) end_parse();
buf = tsearch2_yy_scan_bytes( str, limit );
tsearch2_yy_switch_to_buffer( buf );
...
...
This diff is collapsed.
Click to expand it.
contrib/tsearch2/wparser_def.c
+
2
−
2
View file @
8f678600
...
...
@@ -42,7 +42,7 @@ Datum prsd_start(PG_FUNCTION_ARGS);
Datum
prsd_start
(
PG_FUNCTION_ARGS
)
{
start_parse_str
((
char
*
)
PG_GETARG_POINTER
(
0
),
PG_GETARG_INT32
(
1
));
tsearch2_
start_parse_str
((
char
*
)
PG_GETARG_POINTER
(
0
),
PG_GETARG_INT32
(
1
));
PG_RETURN_POINTER
(
NULL
);
}
...
...
@@ -67,7 +67,7 @@ Datum
prsd_end
(
PG_FUNCTION_ARGS
)
{
/* ParserState *p=(ParserState*)PG_GETARG_POINTER(0); */
end_parse
();
tsearch2_
end_parse
();
PG_RETURN_VOID
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment