Andrew Talbot : fusion: Constify some variables.

Alexandre Julliard julliard at winehq.org
Mon Oct 4 11:03:58 CDT 2010


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Oct  2 23:25:52 2010 +0100

fusion: Constify some variables.

---

 dlls/fusion/asmname.c    |    4 ++--
 dlls/fusion/assembly.c   |    8 ++++----
 dlls/fusion/fusionpriv.h |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/fusion/asmname.c b/dlls/fusion/asmname.c
index 54be4e8..8100e61 100644
--- a/dlls/fusion/asmname.c
+++ b/dlls/fusion/asmname.c
@@ -450,7 +450,7 @@ static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
     return S_OK;
 }
 
-static HRESULT parse_culture(IAssemblyNameImpl *name, LPWSTR culture)
+static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
 {
     static const WCHAR empty[] = {0};
 
@@ -480,7 +480,7 @@ static BYTE hextobyte(WCHAR c)
     return 0;
 }
 
-static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPWSTR pubkey)
+static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
 {
     int i;
     BYTE val;
diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c
index 328b279..a3abc4e 100644
--- a/dlls/fusion/assembly.c
+++ b/dlls/fusion/assembly.c
@@ -146,7 +146,7 @@ static VOID *assembly_data_offset(ASSEMBLY *assembly, ULONG offset)
 #define MAX_TABLES_3BIT_ENCODE 8191
 #define MAX_TABLES_5BIT_ENCODE 2047
 
-static inline ULONG get_table_size(ASSEMBLY *assembly, DWORD index)
+static inline ULONG get_table_size(const ASSEMBLY *assembly, DWORD index)
 {
     DWORD size;
     INT tables;
@@ -731,11 +731,11 @@ HRESULT assembly_release(ASSEMBLY *assembly)
     return S_OK;
 }
 
-static LPWSTR assembly_dup_str(ASSEMBLY *assembly, DWORD index)
+static LPWSTR assembly_dup_str(const ASSEMBLY *assembly, DWORD index)
 {
     int len;
     LPWSTR cpy;
-    LPSTR str = (LPSTR)&assembly->strings[index];
+    LPCSTR str = (LPCSTR)&assembly->strings[index];
 
     len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
 
@@ -772,7 +772,7 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
     return S_OK;
 }
 
-HRESULT assembly_get_path(ASSEMBLY *assembly, LPWSTR *path)
+HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path)
 {
     LPWSTR cpy = HeapAlloc(GetProcessHeap(), 0, (strlenW(assembly->path) + 1) * sizeof(WCHAR));
     *path = cpy;
diff --git a/dlls/fusion/fusionpriv.h b/dlls/fusion/fusionpriv.h
index 6f4b28d..f717f14 100644
--- a/dlls/fusion/fusionpriv.h
+++ b/dlls/fusion/fusionpriv.h
@@ -431,7 +431,7 @@ typedef struct tagASSEMBLY ASSEMBLY;
 HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file);
 HRESULT assembly_release(ASSEMBLY *assembly);
 HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name);
-HRESULT assembly_get_path(ASSEMBLY *assembly, LPWSTR *path);
+HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path);
 HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version);
 BYTE assembly_get_architecture(ASSEMBLY *assembly);
 HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token);




More information about the wine-cvs mailing list