Hans Leidekker : msi: Make the string reference count a short.

Alexandre Julliard julliard at winehq.org
Tue Apr 13 11:24:40 CDT 2010


Module: wine
Branch: master
Commit: 88214a72cedb182c2324ba096fa55353c6be3374
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=88214a72cedb182c2324ba096fa55353c6be3374

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Apr 13 11:15:08 2010 +0200

msi: Make the string reference count a short.

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

---

 dlls/msi/msipriv.h |    2 +-
 dlls/msi/string.c  |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 2b7d6ba..5e699ae 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -660,7 +660,7 @@ enum StringPersistence
     StringNonPersistent = 1
 };
 
-extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, USHORT refcount, enum StringPersistence persistence );
+extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence );
 
 extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id );
 extern VOID msi_destroy_stringtable( string_table *st );
diff --git a/dlls/msi/string.c b/dlls/msi/string.c
index 84f4e71..3bdc436 100644
--- a/dlls/msi/string.c
+++ b/dlls/msi/string.c
@@ -44,8 +44,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
 
 typedef struct _msistring
 {
-    USHORT persistent_refcount;
-    USHORT nonpersistent_refcount;
+    UINT persistent_refcount;
+    UINT nonpersistent_refcount;
     LPWSTR str;
 } msistring;
 
@@ -188,7 +188,7 @@ static void insert_string_sorted( string_table *st, UINT string_id )
     st->sortcount++;
 }
 
-static void set_st_entry( string_table *st, UINT n, LPWSTR str, USHORT refcount, enum StringPersistence persistence )
+static void set_st_entry( string_table *st, UINT n, LPWSTR str, UINT refcount, enum StringPersistence persistence )
 {
     if (persistence == StringPersistent)
     {
@@ -237,7 +237,7 @@ static UINT msi_string2idA( const string_table *st, LPCSTR buffer, UINT *id )
     return r;
 }
 
-static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, USHORT refcount, enum StringPersistence persistence )
+static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, UINT refcount, enum StringPersistence persistence )
 {
     LPWSTR str;
     int sz;
@@ -288,7 +288,7 @@ static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, U
     return n;
 }
 
-int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, USHORT refcount, enum StringPersistence persistence )
+int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence )
 {
     LPWSTR str;
 




More information about the wine-cvs mailing list