fusion: Constify some variables.
This commit is contained in:
parent
49e993c641
commit
ea1ec88091
|
@ -450,7 +450,7 @@ static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT parse_culture(IAssemblyNameImpl *name, LPWSTR culture)
|
static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
|
||||||
{
|
{
|
||||||
static const WCHAR empty[] = {0};
|
static const WCHAR empty[] = {0};
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ static BYTE hextobyte(WCHAR c)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPWSTR pubkey)
|
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
BYTE val;
|
BYTE val;
|
||||||
|
|
|
@ -146,7 +146,7 @@ static VOID *assembly_data_offset(ASSEMBLY *assembly, ULONG offset)
|
||||||
#define MAX_TABLES_3BIT_ENCODE 8191
|
#define MAX_TABLES_3BIT_ENCODE 8191
|
||||||
#define MAX_TABLES_5BIT_ENCODE 2047
|
#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;
|
DWORD size;
|
||||||
INT tables;
|
INT tables;
|
||||||
|
@ -731,11 +731,11 @@ HRESULT assembly_release(ASSEMBLY *assembly)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LPWSTR assembly_dup_str(ASSEMBLY *assembly, DWORD index)
|
static LPWSTR assembly_dup_str(const ASSEMBLY *assembly, DWORD index)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
LPWSTR cpy;
|
LPWSTR cpy;
|
||||||
LPSTR str = (LPSTR)&assembly->strings[index];
|
LPCSTR str = (LPCSTR)&assembly->strings[index];
|
||||||
|
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||||
|
|
||||||
|
@ -772,7 +772,7 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name)
|
||||||
return S_OK;
|
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));
|
LPWSTR cpy = HeapAlloc(GetProcessHeap(), 0, (strlenW(assembly->path) + 1) * sizeof(WCHAR));
|
||||||
*path = cpy;
|
*path = cpy;
|
||||||
|
|
|
@ -431,7 +431,7 @@ typedef struct tagASSEMBLY ASSEMBLY;
|
||||||
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file);
|
HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file);
|
||||||
HRESULT assembly_release(ASSEMBLY *assembly);
|
HRESULT assembly_release(ASSEMBLY *assembly);
|
||||||
HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name);
|
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);
|
HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version);
|
||||||
BYTE assembly_get_architecture(ASSEMBLY *assembly);
|
BYTE assembly_get_architecture(ASSEMBLY *assembly);
|
||||||
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token);
|
HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token);
|
||||||
|
|
Loading…
Reference in New Issue