[1/4] msi: Constify some parameters.

Hans Leidekker hans at codeweavers.com
Thu May 28 08:02:50 CDT 2009


diff --git a/dlls/msi/create.c b/dlls/msi/create.c
index 05c40cf..89d3288 100644
--- a/dlls/msi/create.c
+++ b/dlls/msi/create.c
@@ -42,7 +42,7 @@ typedef struct tagMSICREATEVIEW
 {
     MSIVIEW          view;
     MSIDATABASE     *db;
-    LPWSTR           name;
+    LPCWSTR          name;
     BOOL             bIsTemp;
     BOOL             hold;
     column_info     *col_info;
@@ -145,9 +145,9 @@ static const MSIVIEWOPS create_ops =
     NULL,
 };
 
-static UINT check_columns( column_info *col_info )
+static UINT check_columns( const column_info *col_info )
 {
-    column_info *c1, *c2;
+    const column_info *c1, *c2;
 
     /* check for two columns with the same name */
     for( c1 = col_info; c1; c1 = c1->next )
@@ -158,7 +158,7 @@ static UINT check_columns( column_info *col_info )
     return ERROR_SUCCESS;
 }
 
-UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
+UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
                         column_info *col_info, BOOL hold )
 {
     MSICREATEVIEW *cv = NULL;
diff --git a/dlls/msi/query.h b/dlls/msi/query.h
index 93b13fd..eb11a1c 100644
--- a/dlls/msi/query.h
+++ b/dlls/msi/query.h
@@ -98,7 +98,7 @@ UINT ORDER_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
 UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
                        struct expr *cond );
 
-UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
+UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
                         column_info *col_info, BOOL hold );
 
 UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y
index 8f241b1..6634f61 100644
--- a/dlls/msi/sql.y
+++ b/dlls/msi/sql.y
@@ -54,7 +54,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( LPWSTR list, LPWSTR table );
+static LPWSTR parser_add_table( LPWSTR list, LPCWSTR table );
 static void *parser_alloc( void *info, unsigned int sz );
 static column_info *parser_alloc_column( void *info, LPCWSTR table, LPCWSTR column );
 
@@ -696,7 +696,7 @@ number:
 
 %%
 
-static LPWSTR parser_add_table(LPWSTR list, LPWSTR table)
+static LPWSTR parser_add_table(LPWSTR list, LPCWSTR table)
 {
     DWORD size = lstrlenW(list) + lstrlenW(table) + 2;
     static const WCHAR space[] = {' ',0};



More information about the wine-patches mailing list