From b075f03acbe98b4a1c9de486377ed952cd01af21 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 30 May 2005 11:32:18 +0000 Subject: [PATCH] Remove more types from the parser. --- dlls/msi/insert.c | 6 +++--- dlls/msi/query.h | 2 +- dlls/msi/sql.y | 25 ++++++++----------------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/dlls/msi/insert.c b/dlls/msi/insert.c index 120e093cc99..c3932907a15 100644 --- a/dlls/msi/insert.c +++ b/dlls/msi/insert.c @@ -44,7 +44,7 @@ typedef struct tagMSIINSERTVIEW MSIDATABASE *db; BOOL bIsTemp; MSIVIEW *sv; - value_list *vals; + column_info *vals; } MSIINSERTVIEW; static UINT INSERT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val ) @@ -62,7 +62,7 @@ static UINT INSERT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT * Merge a value_list and a record to create a second record. * Replace wildcard entries in the valuelist with values from the record */ -static MSIRECORD *INSERT_merge_record( UINT fields, value_list *vl, MSIRECORD *rec ) +static MSIRECORD *INSERT_merge_record( UINT fields, column_info *vl, MSIRECORD *rec ) { MSIRECORD *merged; DWORD wildcard_count = 1, i; @@ -255,7 +255,7 @@ MSIVIEWOPS insert_ops = }; UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table, - column_info *columns, value_list *values, BOOL temp ) + column_info *columns, column_info *values, BOOL temp ) { MSIINSERTVIEW *iv = NULL; UINT r; diff --git a/dlls/msi/query.h b/dlls/msi/query.h index 07d48766c39..31a30520c6b 100644 --- a/dlls/msi/query.h +++ b/dlls/msi/query.h @@ -115,7 +115,7 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table, column_info *col_info, BOOL temp ); UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table, - column_info *columns, value_list *values, BOOL temp ); + column_info *columns, column_info *values, BOOL temp ); UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **, LPWSTR table, column_info *list, struct expr *expr ); diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index e97399d97e9..cdffd1617f4 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -74,7 +74,6 @@ static struct expr * EXPR_wildcard( void *info ); struct sql_str str; LPWSTR string; column_info *column_list; - value_list *val_list; MSIVIEW *query; struct expr *expr; USHORT column_type; @@ -126,12 +125,11 @@ static struct expr * EXPR_wildcard( void *info ); %type table id %type selcollist column column_and_type column_def table_def -%type column_assignment update_assign_list +%type column_assignment update_assign_list constlist %type query from fromtable selectfrom unorderedsel %type oneupdate onedelete oneselect onequery onecreate oneinsert %type expr val column_val const_val %type column_type data_type data_type_l data_count -%type constlist %% @@ -498,25 +496,18 @@ val: constlist: const_val { - value_list *vals; - - vals = parser_alloc( info, sizeof *vals ); - if( !vals ) + $$ = parser_alloc_column( info, NULL, NULL ); + if( !$$ ) YYABORT; - vals->val = $1; - vals->next = NULL; - $$ = vals; + $$->val = $1; } | const_val TK_COMMA constlist { - value_list *vals; - - vals = parser_alloc( info, sizeof *vals ); - if( !vals ) + $$ = parser_alloc_column( info, NULL, NULL ); + if( !$$ ) YYABORT; - vals->val = $1; - vals->next = $3; - $$ = vals; + $$->val = $1; + $$->next = $3; } ;