msi: Constify some variables.
This commit is contained in:
parent
ffc4a4f301
commit
8b362f7fc8
|
@ -548,17 +548,17 @@ enum StringPersistence
|
|||
};
|
||||
|
||||
extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence );
|
||||
extern UINT msi_id2stringW( string_table *st, UINT string_no, LPWSTR buffer, UINT *sz );
|
||||
extern UINT msi_id2stringA( string_table *st, UINT string_no, LPSTR buffer, UINT *sz );
|
||||
extern UINT msi_id2stringW( const string_table *st, UINT string_no, LPWSTR buffer, UINT *sz );
|
||||
extern UINT msi_id2stringA( const string_table *st, UINT string_no, LPSTR buffer, UINT *sz );
|
||||
|
||||
extern UINT msi_string2idW( string_table *st, LPCWSTR buffer, UINT *id );
|
||||
extern UINT msi_string2idA( string_table *st, LPCSTR str, UINT *id );
|
||||
extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id );
|
||||
extern UINT msi_string2idA( const string_table *st, LPCSTR str, UINT *id );
|
||||
extern VOID msi_destroy_stringtable( string_table *st );
|
||||
extern UINT msi_strcmp( string_table *st, UINT lval, UINT rval, UINT *res );
|
||||
extern const WCHAR *msi_string_lookup_id( string_table *st, UINT id );
|
||||
extern UINT msi_strcmp( const string_table *st, UINT lval, UINT rval, UINT *res );
|
||||
extern const WCHAR *msi_string_lookup_id( const string_table *st, UINT id );
|
||||
extern HRESULT msi_init_string_table( IStorage *stg );
|
||||
extern string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref );
|
||||
extern UINT msi_save_string_table( string_table *st, IStorage *storage );
|
||||
extern UINT msi_save_string_table( const string_table *st, IStorage *storage );
|
||||
|
||||
|
||||
extern void msi_table_set_strref(UINT bytes_per_strref);
|
||||
|
|
|
@ -98,7 +98,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
|
|||
UINT TABLE_CreateView( MSIDATABASE *db, LPCWSTR name, MSIVIEW **view );
|
||||
|
||||
UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
||||
column_info *columns );
|
||||
const column_info *columns );
|
||||
|
||||
UINT DISTINCT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table );
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static int select_count_columns( column_info *col )
|
||||
static int select_count_columns( const column_info *col )
|
||||
{
|
||||
int n;
|
||||
for (n = 0; col; col = col->next)
|
||||
|
@ -319,7 +319,7 @@ static int select_count_columns( column_info *col )
|
|||
}
|
||||
|
||||
UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
||||
column_info *columns )
|
||||
const column_info *columns )
|
||||
{
|
||||
MSISELECTVIEW *sv = NULL;
|
||||
UINT count = 0, r = ERROR_SUCCESS;
|
||||
|
|
|
@ -51,7 +51,7 @@ typedef struct tag_SQL_input
|
|||
struct list *mem;
|
||||
} SQL_input;
|
||||
|
||||
static LPWSTR SQL_getstring( void *info, struct sql_str *str );
|
||||
static LPWSTR SQL_getstring( void *info, const struct sql_str *str );
|
||||
static INT SQL_getint( void *info );
|
||||
static int sql_lex( void *SQL_lval, SQL_input *info );
|
||||
|
||||
|
@ -62,9 +62,9 @@ static BOOL SQL_MarkPrimaryKeys( column_info *cols, column_info *keys);
|
|||
|
||||
static struct expr * EXPR_complex( void *info, struct expr *l, UINT op, struct expr *r );
|
||||
static struct expr * EXPR_unary( void *info, struct expr *l, UINT op );
|
||||
static struct expr * EXPR_column( void *info, column_info *column );
|
||||
static struct expr * EXPR_column( void *info, const column_info *column );
|
||||
static struct expr * EXPR_ival( void *info, int val );
|
||||
static struct expr * EXPR_sval( void *info, struct sql_str * );
|
||||
static struct expr * EXPR_sval( void *info, const struct sql_str * );
|
||||
static struct expr * EXPR_wildcard( void *info );
|
||||
|
||||
%}
|
||||
|
@ -697,7 +697,7 @@ static int sql_lex( void *SQL_lval, SQL_input *sql )
|
|||
return token;
|
||||
}
|
||||
|
||||
LPWSTR SQL_getstring( void *info, struct sql_str *strdata )
|
||||
LPWSTR SQL_getstring( void *info, const struct sql_str *strdata )
|
||||
{
|
||||
LPCWSTR p = strdata->data;
|
||||
UINT len = strdata->len;
|
||||
|
@ -779,7 +779,7 @@ static struct expr * EXPR_unary( void *info, struct expr *l, UINT op )
|
|||
return e;
|
||||
}
|
||||
|
||||
static struct expr * EXPR_column( void *info, column_info *column )
|
||||
static struct expr * EXPR_column( void *info, const column_info *column )
|
||||
{
|
||||
struct expr *e = parser_alloc( info, sizeof *e );
|
||||
if( e )
|
||||
|
@ -801,7 +801,7 @@ static struct expr * EXPR_ival( void *info, int val )
|
|||
return e;
|
||||
}
|
||||
|
||||
static struct expr * EXPR_sval( void *info, struct sql_str *str )
|
||||
static struct expr * EXPR_sval( void *info, const struct sql_str *str )
|
||||
{
|
||||
struct expr *e = parser_alloc( info, sizeof *e );
|
||||
if( e )
|
||||
|
|
|
@ -279,7 +279,7 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
|
|||
}
|
||||
|
||||
/* find the string identified by an id - return null if there's none */
|
||||
const WCHAR *msi_string_lookup_id( string_table *st, UINT id )
|
||||
const WCHAR *msi_string_lookup_id( const string_table *st, UINT id )
|
||||
{
|
||||
static const WCHAR zero[] = { 0 };
|
||||
if( id == 0 )
|
||||
|
@ -306,7 +306,7 @@ const WCHAR *msi_string_lookup_id( string_table *st, UINT id )
|
|||
* The size includes the terminating nul character. Short buffers
|
||||
* will be filled, but not nul terminated.
|
||||
*/
|
||||
UINT msi_id2stringW( string_table *st, UINT id, LPWSTR buffer, UINT *sz )
|
||||
UINT msi_id2stringW( const string_table *st, UINT id, LPWSTR buffer, UINT *sz )
|
||||
{
|
||||
UINT len;
|
||||
const WCHAR *str;
|
||||
|
@ -345,7 +345,7 @@ UINT msi_id2stringW( string_table *st, UINT id, LPWSTR buffer, UINT *sz )
|
|||
* The size includes the terminating nul character. Short buffers
|
||||
* will be filled, but not nul terminated.
|
||||
*/
|
||||
UINT msi_id2stringA( string_table *st, UINT id, LPSTR buffer, UINT *sz )
|
||||
UINT msi_id2stringA( const string_table *st, UINT id, LPSTR buffer, UINT *sz )
|
||||
{
|
||||
UINT len;
|
||||
const WCHAR *str;
|
||||
|
@ -387,7 +387,7 @@ UINT msi_id2stringA( string_table *st, UINT id, LPSTR buffer, UINT *sz )
|
|||
* [in] str - string to find in the string table
|
||||
* [out] id - id of the string, if found
|
||||
*/
|
||||
UINT msi_string2idW( string_table *st, LPCWSTR str, UINT *id )
|
||||
UINT msi_string2idW( const string_table *st, LPCWSTR str, UINT *id )
|
||||
{
|
||||
UINT n, hash = msistring_makehash( str );
|
||||
msistring *se = st->strings;
|
||||
|
@ -404,7 +404,7 @@ UINT msi_string2idW( string_table *st, LPCWSTR str, UINT *id )
|
|||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
UINT msi_string2idA( string_table *st, LPCSTR buffer, UINT *id )
|
||||
UINT msi_string2idA( const string_table *st, LPCSTR buffer, UINT *id )
|
||||
{
|
||||
DWORD sz;
|
||||
UINT r = ERROR_INVALID_PARAMETER;
|
||||
|
@ -432,7 +432,7 @@ UINT msi_string2idA( string_table *st, LPCSTR buffer, UINT *id )
|
|||
return r;
|
||||
}
|
||||
|
||||
UINT msi_strcmp( string_table *st, UINT lval, UINT rval, UINT *res )
|
||||
UINT msi_strcmp( const string_table *st, UINT lval, UINT rval, UINT *res )
|
||||
{
|
||||
const WCHAR *l_str, *r_str;
|
||||
|
||||
|
@ -450,7 +450,7 @@ UINT msi_strcmp( string_table *st, UINT lval, UINT rval, UINT *res )
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static void string_totalsize( string_table *st, UINT *datasize, UINT *poolsize )
|
||||
static void string_totalsize( const string_table *st, UINT *datasize, UINT *poolsize )
|
||||
{
|
||||
UINT i, len, max, holesize;
|
||||
|
||||
|
@ -595,7 +595,7 @@ end:
|
|||
return st;
|
||||
}
|
||||
|
||||
UINT msi_save_string_table( string_table *st, IStorage *storage )
|
||||
UINT msi_save_string_table( const string_table *st, IStorage *storage )
|
||||
{
|
||||
UINT i, datasize = 0, poolsize = 0, sz, used, r, codepage, n;
|
||||
UINT ret = ERROR_FUNCTION_FAILED;
|
||||
|
|
|
@ -131,7 +131,7 @@ static UINT get_type( UINT uiProperty )
|
|||
return VT_EMPTY;
|
||||
}
|
||||
|
||||
static UINT get_property_count( PROPVARIANT *property )
|
||||
static UINT get_property_count( const PROPVARIANT *property )
|
||||
{
|
||||
UINT i, n = 0;
|
||||
|
||||
|
@ -293,7 +293,7 @@ static DWORD write_dword( LPBYTE data, DWORD ofs, DWORD val )
|
|||
return 4;
|
||||
}
|
||||
|
||||
static DWORD write_filetime( LPBYTE data, DWORD ofs, LPFILETIME ft )
|
||||
static DWORD write_filetime( LPBYTE data, DWORD ofs, const FILETIME *ft )
|
||||
{
|
||||
write_dword( data, ofs, ft->dwLowDateTime );
|
||||
write_dword( data, ofs + 4, ft->dwHighDateTime );
|
||||
|
@ -309,7 +309,7 @@ static DWORD write_string( LPBYTE data, DWORD ofs, LPCSTR str )
|
|||
return (7 + len) & ~3;
|
||||
}
|
||||
|
||||
static UINT write_property_to_data( PROPVARIANT *prop, LPBYTE data )
|
||||
static UINT write_property_to_data( const PROPVARIANT *prop, LPBYTE data )
|
||||
{
|
||||
DWORD sz = 0;
|
||||
|
||||
|
@ -336,7 +336,7 @@ static UINT write_property_to_data( PROPVARIANT *prop, LPBYTE data )
|
|||
return sz;
|
||||
}
|
||||
|
||||
static UINT save_summary_info( MSISUMMARYINFO * si, IStream *stm )
|
||||
static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm )
|
||||
{
|
||||
UINT ret = ERROR_FUNCTION_FAILED;
|
||||
PROPERTYSETHEADER set_hdr;
|
||||
|
|
Loading…
Reference in New Issue