File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
src/interfaces/ecpg/preproc Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
- /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.308 2005/07/02 17:01:53 momjian Exp $ */
1
+ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.309 2005/08/22 20:25:03 momjian Exp $ */
2
2
3
3
/* Copyright comment */
4
4
%{
@@ -4216,16 +4216,11 @@ Bconst: BCONST { $$ = make_name();};
4216
4216
Xconst : XCONST { $$ = make_name();};
4217
4217
Sconst : SCONST
4218
4218
{
4219
- char *ret;
4220
-
4221
- $$ = ret = (char *)mm_alloc(strlen($1 ) + 4 );
4222
- if (strchr($1 , ' \\ ' ) != NULL )
4223
- *ret++ = ESCAPE_STRING_SYNTAX;
4224
- *ret++ = ' \' ' ;
4225
- strcpy (ret, $1 );
4226
- ret += strlen($1 );
4227
- *ret++ = ' \' ' ;
4228
- *ret++ = ' \0 ' ;
4219
+ $$ = (char *)mm_alloc(strlen($1 ) + 3 );
4220
+ $$ [0 ]=' \' ' ;
4221
+ strcpy ($$+1 , $1 );
4222
+ $$ [strlen($1 )+2 ]=' \0 ' ;
4223
+ $$ [strlen($1 )+1 ]=' \' ' ;
4229
4224
free ($1 );
4230
4225
}
4231
4226
;
You can’t perform that action at this time.
0 commit comments