Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a4b76cee
Commit
a4b76cee
authored
May 28, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
May 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Consistently use the parser allocator when parsing a query.
parent
5922de46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
sql.y
dlls/msi/sql.y
+15
-12
No files found.
dlls/msi/sql.y
View file @
a4b76cee
...
...
@@ -32,6 +32,7 @@
#include "query.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#define YYLEX_PARAM info
#define YYPARSE_PARAM info
...
...
@@ -54,7 +55,7 @@ static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *st
static INT SQL_getint( void *info );
static int sql_lex( void *SQL_lval, SQL_input *info );
static LPWSTR parser_add_table(
LP
WSTR list, LPCWSTR table );
static LPWSTR parser_add_table(
void *info, LPC
WSTR list, LPCWSTR table );
static void *parser_alloc( void *info, unsigned int sz );
static column_info *parser_alloc_column( void *info, LPCWSTR table, LPCWSTR column );
...
...
@@ -492,7 +493,6 @@ fromtable:
UINT r;
r = JOIN_CreateView( sql->db, &$$, $2 );
msi_free( $2 );
if( r != ERROR_SUCCESS )
YYABORT;
}
...
...
@@ -501,12 +501,12 @@ fromtable:
tablelist:
table
{
$$ =
strdupW($1)
;
$$ =
$1
;
}
|
table TK_COMMA tablelist
{
$$ = parser_add_table(
$3, $1
);
$$ = parser_add_table(
info, $3, $1
);
if (!$$)
YYABORT;
}
...
...
@@ -696,17 +696,20 @@ number:
%%
static LPWSTR parser_add_table(
LPWSTR list, LPCWSTR table
)
static LPWSTR parser_add_table(
void *info, LPCWSTR list, LPCWSTR table
)
{
DWORD size = lstrlenW(list) + lstrlenW(table) + 2;
static const WCHAR space[] = {' ',0};
DWORD len = strlenW( list ) + strlenW( table ) + 2;
LPWSTR ret;
list = msi_realloc(list, size * sizeof(WCHAR));
if (!list) return NULL;
lstrcatW(list, space);
lstrcatW(list, table);
return list;
ret = parser_alloc( info, len * sizeof(WCHAR) );
if( ret )
{
strcpyW( ret, list );
strcatW( ret, space );
strcatW( ret, table );
}
return ret;
}
static void *parser_alloc( void *info, unsigned int sz )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment