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

Commit4d3456e

Browse files
committed
Remove outside-the-scanner references to "yyleng".
It seems the flex developers have decided to change yyleng from int to size_t.This has already happened in the latest release of OS X, and will starthappening elsewhere once the next release of flex appears. Rather than tryingto divine how it's declared in any particular build, let's just remove the oneexisting not-very-necessary external usage.Back-patch to all supported branches; not so much because users in the fieldare likely to care about building old branches with cutting-edge flex, asto keep OSX-based buildfarm members from having problems with old branches.
1 parent9f0e84a commit4d3456e

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

‎src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.8 2009/08/07 10:51:20 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.9 2009/09/08 04:25:00 tgl Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -184,11 +184,7 @@ make3_str(char *str1, char *str2, char *str3)
184184
static char *
185185
make_name(void)
186186
{
187-
char * name = (char *)mm_alloc(yyleng + 1);
188-
189-
strncpy(name, yytext, yyleng);
190-
name[yyleng] = '\0';
191-
return(name);
187+
return mm_strdup(yytext);
192188
}
193189

194190
static char *
@@ -220,7 +216,7 @@ create_questionmarks(char *name, bool array)
220216
for (; count > 0; count --)
221217
{
222218
sprintf(pacounter_buffer, "$%d", pacounter++);
223-
result = cat_str(3, result,strdup(pacounter_buffer), make_str(" , "));
219+
result = cat_str(3, result,mm_strdup(pacounter_buffer), make_str(" , "));
224220
}
225221

226222
/* removed the trailing " ," */

‎src/interfaces/ecpg/preproc/extern.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.74 2009/07/14 20:24:10 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.75 2009/09/08 04:25:00 tgl Exp $ */
22

33
#ifndef_ECPG_PREPROC_EXTERN_H
44
#define_ECPG_PREPROC_EXTERN_H
@@ -39,8 +39,7 @@ extern char *yytext,
3939
#ifdefYYDEBUG
4040
externintyydebug;
4141
#endif
42-
externintyylineno,
43-
yyleng;
42+
externintyylineno;
4443
externFILE*yyin,
4544
*yyout;
4645
externchar*output_filename;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp