msi: Make the string reference count a short.

This is safe because the reference count is stored in 2 bytes on disk.

(This is commit ff2f894888 reapplied
because of incorrect revert in 88214a72ce).
This commit is contained in:
Hans Leidekker 2010-04-13 11:15:08 +02:00 committed by Alexandre Julliard
parent e1eaa4132a
commit 109ffd0f97
2 changed files with 6 additions and 6 deletions

View File

@ -660,7 +660,7 @@ enum StringPersistence
StringNonPersistent = 1 StringNonPersistent = 1
}; };
extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence ); extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, USHORT refcount, enum StringPersistence persistence );
extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id ); extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id );
extern VOID msi_destroy_stringtable( string_table *st ); extern VOID msi_destroy_stringtable( string_table *st );

View File

@ -44,8 +44,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
typedef struct _msistring typedef struct _msistring
{ {
UINT persistent_refcount; USHORT persistent_refcount;
UINT nonpersistent_refcount; USHORT nonpersistent_refcount;
LPWSTR str; LPWSTR str;
} msistring; } msistring;
@ -188,7 +188,7 @@ static void insert_string_sorted( string_table *st, UINT string_id )
st->sortcount++; st->sortcount++;
} }
static void set_st_entry( string_table *st, UINT n, LPWSTR str, UINT refcount, enum StringPersistence persistence ) static void set_st_entry( string_table *st, UINT n, LPWSTR str, USHORT refcount, enum StringPersistence persistence )
{ {
if (persistence == StringPersistent) if (persistence == StringPersistent)
{ {
@ -237,7 +237,7 @@ static UINT msi_string2idA( const string_table *st, LPCSTR buffer, UINT *id )
return r; return r;
} }
static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, UINT refcount, enum StringPersistence persistence ) static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, USHORT refcount, enum StringPersistence persistence )
{ {
LPWSTR str; LPWSTR str;
int sz; int sz;
@ -288,7 +288,7 @@ static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, U
return n; return n;
} }
int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence ) int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, USHORT refcount, enum StringPersistence persistence )
{ {
LPWSTR str; LPWSTR str;