msi: Constify some variables.

This commit is contained in:
Andrew Talbot 2007-06-13 22:36:31 +01:00 committed by Alexandre Julliard
parent 1081a9b144
commit cf1e01eb0c
5 changed files with 19 additions and 18 deletions

View File

@ -570,7 +570,7 @@ extern UINT read_raw_stream_data( MSIDATABASE*, LPCWSTR stname,
extern UINT read_stream_data( IStorage *stg, LPCWSTR stname,
USHORT **pdata, UINT *psz );
extern UINT write_stream_data( IStorage *stg, LPCWSTR stname,
LPVOID data, UINT sz, BOOL bTable );
LPCVOID data, UINT sz, BOOL bTable );
/* transform functions */
extern UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg );
@ -609,7 +609,7 @@ extern UINT MSI_RecordCopyField( MSIRECORD *, unsigned int, MSIRECORD *, unsigne
extern UINT get_raw_stream( MSIHANDLE hdb, LPCWSTR stname, IStream **stm );
extern UINT db_get_raw_stream( MSIDATABASE *db, LPCWSTR stname, IStream **stm );
extern void enum_stream_names( IStorage *stg );
extern BOOL decode_streamname(LPWSTR in, LPWSTR out);
extern BOOL decode_streamname(LPCWSTR in, LPWSTR out);
extern LPWSTR encode_streamname(BOOL bTable, LPCWSTR in);
/* database internals */

View File

@ -114,7 +114,7 @@ UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *columns, column_info *values, BOOL temp );
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **, LPWSTR table,
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **, LPCWSTR table,
column_info *list, struct expr *expr );
UINT DELETE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );

View File

@ -206,7 +206,7 @@ static int mime2utf(int x)
return '_';
}
BOOL decode_streamname(LPWSTR in, LPWSTR out)
BOOL decode_streamname(LPCWSTR in, LPWSTR out)
{
WCHAR ch;
DWORD count = 0;
@ -408,7 +408,7 @@ end:
}
UINT write_stream_data( IStorage *stg, LPCWSTR stname,
LPVOID data, UINT sz, BOOL bTable )
LPCVOID data, UINT sz, BOOL bTable )
{
HRESULT r;
UINT ret = ERROR_FUNCTION_FAILED;
@ -819,7 +819,7 @@ static UINT get_table( MSIDATABASE *db, LPCWSTR name, MSITABLE **table_ret )
return ERROR_SUCCESS;
}
static UINT save_table( MSIDATABASE *db, MSITABLE *t )
static UINT save_table( MSIDATABASE *db, const MSITABLE *t )
{
BYTE *rawdata = NULL, *p;
UINT rawsize, r, i, j, row_size;
@ -933,12 +933,12 @@ static void msi_free_colinfo( MSICOLUMNINFO *colinfo, UINT count )
}
}
static LPWSTR msi_makestring( MSIDATABASE *db, UINT stringid)
static LPWSTR msi_makestring( const MSIDATABASE *db, UINT stringid)
{
return strdupW(msi_string_lookup_id( db->strings, stringid ));
}
static UINT read_table_int(BYTE **data, UINT row, UINT col, UINT bytes)
static UINT read_table_int(BYTE *const *data, UINT row, UINT col, UINT bytes)
{
UINT ret = 0, i;
@ -1720,7 +1720,8 @@ MSICONDITION MSI_DatabaseIsTablePersistent( MSIDATABASE *db, LPCWSTR table )
return MSICONDITION_FALSE;
}
static MSIRECORD *msi_get_transform_record( MSITABLEVIEW *tv, string_table *st, USHORT *rawdata )
static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string_table *st,
const USHORT *rawdata )
{
UINT i, val, ofs = 0;
USHORT mask = *rawdata++;
@ -1793,7 +1794,7 @@ static void dump_record( MSIRECORD *rec )
}
}
static void dump_table( string_table *st, USHORT *rawdata, UINT rawsize )
static void dump_table( const string_table *st, const USHORT *rawdata, UINT rawsize )
{
LPCWSTR sval;
UINT i;
@ -1805,7 +1806,7 @@ static void dump_table( string_table *st, USHORT *rawdata, UINT rawsize )
}
}
static UINT* msi_record_to_row( MSITABLEVIEW *tv, MSIRECORD *rec )
static UINT* msi_record_to_row( const MSITABLEVIEW *tv, MSIRECORD *rec )
{
LPCWSTR str;
UINT i, r, *data;
@ -1845,7 +1846,7 @@ static UINT* msi_record_to_row( MSITABLEVIEW *tv, MSIRECORD *rec )
return data;
}
static UINT msi_row_matches( MSITABLEVIEW *tv, UINT row, UINT *data )
static UINT msi_row_matches( MSITABLEVIEW *tv, UINT row, const UINT *data )
{
UINT i, r, x, ret = ERROR_FUNCTION_FAILED;

View File

@ -186,7 +186,7 @@ static const MSIVIEWOPS update_ops =
UPDATE_find_matching_rows
};
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
column_info *columns, struct expr *expr )
{
MSIUPDATEVIEW *uv = NULL;

View File

@ -139,8 +139,8 @@ static INT INT_evaluate_unary( INT lval, UINT op )
return 0;
}
static const WCHAR *STRING_evaluate( string_table *st,
MSIVIEW *table, UINT row, struct expr *expr, MSIRECORD *record )
static const WCHAR *STRING_evaluate( const string_table *st,
MSIVIEW *table, UINT row, const struct expr *expr, const MSIRECORD *record )
{
UINT val = 0, r;
@ -165,8 +165,8 @@ static const WCHAR *STRING_evaluate( string_table *st,
return NULL;
}
static UINT STRCMP_Evaluate( string_table *st, MSIVIEW *table, UINT row,
struct expr *cond, INT *val, MSIRECORD *record )
static UINT STRCMP_Evaluate( const string_table *st, MSIVIEW *table, UINT row,
const struct expr *cond, INT *val, const MSIRECORD *record )
{
int sr;
const WCHAR *l_str, *r_str;
@ -190,7 +190,7 @@ static UINT STRCMP_Evaluate( string_table *st, MSIVIEW *table, UINT row,
}
static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row,
struct expr *cond, INT *val, MSIRECORD *record )
const struct expr *cond, INT *val, MSIRECORD *record )
{
UINT r, tval;
INT lval, rval;