msi: Constify some variables (1 of 2)
Andrew Talbot
Andrew.Talbot at talbotville.com
Sat Jun 2 17:00:14 CDT 2007
Changelog:
msi: Constify some variables.
diff -urN a/dlls/msi/database.c b/dlls/msi/database.c
--- a/dlls/msi/database.c 2007-04-24 13:26:03.000000000 +0100
+++ b/dlls/msi/database.c 2007-06-02 21:16:50.000000000 +0100
@@ -345,7 +345,7 @@
return prelude;
}
-static LPWSTR msi_build_createsql_columns(LPWSTR *columns_data, LPWSTR *types, DWORD num_columns)
+static LPWSTR msi_build_createsql_columns(const LPWSTR *columns_data, const LPWSTR *types, DWORD num_columns)
{
LPWSTR columns;
LPCWSTR type;
@@ -417,7 +417,7 @@
return columns;
}
-static LPWSTR msi_build_createsql_postlude(LPWSTR *primary_keys, DWORD num_keys)
+static LPWSTR msi_build_createsql_postlude(const LPWSTR *primary_keys, DWORD num_keys)
{
LPWSTR postlude, keys, ptr;
DWORD size, key_size, i;
@@ -454,7 +454,8 @@
return postlude;
}
-static UINT msi_add_table_to_db(MSIDATABASE *db, LPWSTR *columns, LPWSTR *types, LPWSTR *labels, DWORD num_labels, DWORD num_columns)
+static UINT msi_add_table_to_db(MSIDATABASE *db, const LPWSTR *columns, const LPWSTR *types,
+ LPWSTR *labels, DWORD num_labels, DWORD num_columns)
{
UINT r;
DWORD size;
@@ -511,7 +512,7 @@
return prelude;
}
-static LPWSTR msi_build_insertsql_columns(LPWSTR *columns_data, LPWSTR *types, DWORD num_columns)
+static LPWSTR msi_build_insertsql_columns(const LPWSTR *columns_data, LPWSTR *types, DWORD num_columns)
{
LPWSTR columns;
DWORD sql_size = 1, i;
@@ -544,7 +545,7 @@
return columns;
}
-static LPWSTR msi_build_insertsql_data(LPWSTR **records, LPWSTR *types, DWORD num_columns, DWORD irec)
+static LPWSTR msi_build_insertsql_data(LPWSTR *const *records, const LPWSTR *types, DWORD num_columns, DWORD irec)
{
LPWSTR columns;
DWORD sql_size = 1, i;
@@ -589,8 +590,8 @@
return columns;
}
-static UINT msi_add_records_to_table(MSIDATABASE *db, LPWSTR *columns, LPWSTR *types,
- LPWSTR *labels, LPWSTR **records,
+static UINT msi_add_records_to_table(MSIDATABASE *db, const LPWSTR *columns, LPWSTR *types,
+ LPWSTR *labels, LPWSTR *const *records,
int num_columns, int num_records)
{
MSIQUERY *view;
diff -urN a/dlls/msi/dialog.c b/dlls/msi/dialog.c
--- a/dlls/msi/dialog.c 2007-05-25 23:23:57.000000000 +0100
+++ b/dlls/msi/dialog.c 2007-06-02 21:17:05.000000000 +0100
@@ -164,7 +164,7 @@
static DWORD uiThreadId;
static HWND hMsiHiddenWindow;
-static INT msi_dialog_scale_unit( msi_dialog *dialog, INT val )
+static INT msi_dialog_scale_unit( const msi_dialog *dialog, INT val )
{
return (dialog->scale * val + 5) / 10;
}
@@ -335,7 +335,7 @@
return ERROR_SUCCESS;
}
-static msi_font *msi_dialog_find_font( msi_dialog *dialog, LPCWSTR name )
+static msi_font *msi_dialog_find_font( const msi_dialog *dialog, LPCWSTR name )
{
msi_font *font;
@@ -1256,7 +1256,7 @@
}
/* now move to the next control if necessary */
-static VOID msi_mask_next_control( struct msi_maskedit_info *info, HWND hWnd )
+static VOID msi_mask_next_control( const struct msi_maskedit_info *info, HWND hWnd )
{
HWND hWndNext;
UINT len, i;
@@ -1553,7 +1553,7 @@
}
/* FIXME: test when this should fail */
-static BOOL msi_dialog_verify_path( LPWSTR path )
+static BOOL msi_dialog_verify_path( LPCWSTR path )
{
if ( !lstrlenW( path ) )
return FALSE;
@@ -1749,7 +1749,7 @@
};
static void
-msi_seltree_sync_item_state( HWND hwnd, MSIFEATURE *feature, HTREEITEM hItem )
+msi_seltree_sync_item_state( HWND hwnd, const MSIFEATURE *feature, HTREEITEM hItem )
{
TVITEMW tvi;
DWORD index = feature->Action;
@@ -3066,7 +3066,7 @@
}
static UINT msi_dialog_get_checkbox_state( msi_dialog *dialog,
- msi_control *control )
+ const msi_control *control )
{
WCHAR state[2] = { 0 };
DWORD sz = 2;
@@ -3076,7 +3076,7 @@
}
static void msi_dialog_set_checkbox_state( msi_dialog *dialog,
- msi_control *control, UINT state )
+ const msi_control *control, UINT state )
{
static const WCHAR szState[] = { '1', 0 };
LPCWSTR val;
More information about the wine-patches
mailing list