Dmitry Timoshkov : oleaut32: Make some data const and static.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 28 06:05:49 CST 2006
Module: wine
Branch: master
Commit: 601bf6ea12b5f2761d27230ef22eb0fe23ddfb0f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=601bf6ea12b5f2761d27230ef22eb0fe23ddfb0f
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Tue Nov 28 18:39:22 2006 +0800
oleaut32: Make some data const and static.
---
dlls/oleaut32/oaidl_p.c | 4 ++--
dlls/oleaut32/typelib.c | 2 +-
dlls/oleaut32/ungif.c | 2 +-
dlls/oleaut32/usrmarshal.c | 2 +-
dlls/oleaut32/variant.c | 12 ++++++------
dlls/oleaut32/variant.h | 4 ++--
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/oleaut32/oaidl_p.c b/dlls/oleaut32/oaidl_p.c
index 1102e1c..c4419d7 100644
--- a/dlls/oleaut32/oaidl_p.c
+++ b/dlls/oleaut32/oaidl_p.c
@@ -13702,7 +13702,7 @@ static const MIDL_TYPE_FORMAT_STRING __M
}
};
-static const CInterfaceProxyVtbl * _oaidl_ProxyVtblList[] =
+static const CInterfaceProxyVtbl * const _oaidl_ProxyVtblList[] =
{
( const CInterfaceProxyVtbl *) &_IDispatchProxyVtbl,
( const CInterfaceProxyVtbl *) &_ITypeInfoProxyVtbl,
@@ -13718,7 +13718,7 @@ static const CInterfaceProxyVtbl * _oaid
0
};
-static const CInterfaceStubVtbl * _oaidl_StubVtblList[] =
+static const CInterfaceStubVtbl * const _oaidl_StubVtblList[] =
{
( const CInterfaceStubVtbl *) &_IDispatchStubVtbl,
( const CInterfaceStubVtbl *) &_ITypeInfoStubVtbl,
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index a12deb1..6c3b16a 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -1149,7 +1149,7 @@ static void dump_FUNCDESC(const FUNCDESC
dump_ELEMDESC(&funcdesc->elemdescFunc);
}
-static const char * typekind_desc[] =
+static const char * const typekind_desc[] =
{
"TKIND_ENUM",
"TKIND_RECORD",
diff --git a/dlls/oleaut32/ungif.c b/dlls/oleaut32/ungif.c
index cf1d355..e80f8ab 100644
--- a/dlls/oleaut32/ungif.c
+++ b/dlls/oleaut32/ungif.c
@@ -742,7 +742,7 @@ DGifDecompressInput(GifFileType * GifFil
GifFilePrivateType *Private = (GifFilePrivateType *)GifFile->Private;
GifByteType NextByte;
- static unsigned short CodeMasks[] = {
+ static const unsigned short CodeMasks[] = {
0x0000, 0x0001, 0x0003, 0x0007,
0x000f, 0x001f, 0x003f, 0x007f,
0x00ff, 0x01ff, 0x03ff, 0x07ff,
diff --git a/dlls/oleaut32/usrmarshal.c b/dlls/oleaut32/usrmarshal.c
index c940f80..02a3ed9 100644
--- a/dlls/oleaut32/usrmarshal.c
+++ b/dlls/oleaut32/usrmarshal.c
@@ -51,7 +51,7 @@ CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer)
extern const ExtendedProxyFileInfo oaidl_ProxyFileInfo;
-const ProxyFileInfo* OLEAUT32_ProxyFileList[] = {
+static const ProxyFileInfo *OLEAUT32_ProxyFileList[] = {
&oaidl_ProxyFileInfo,
NULL
};
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index be5ced4..66c3d07 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -44,7 +44,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(variant);
-const char* wine_vtypes[VT_CLSID+1] =
+const char * const wine_vtypes[VT_CLSID+1] =
{
"VT_EMPTY","VT_NULL","VT_I2","VT_I4","VT_R4","VT_R8","VT_CY","VT_DATE",
"VT_BSTR","VT_DISPATCH","VT_ERROR","VT_BOOL","VT_VARIANT","VT_UNKNOWN",
@@ -57,7 +57,7 @@ const char* wine_vtypes[VT_CLSID+1] =
"VT_STREAMED_OBJECT","VT_STORED_OBJECT","VT_BLOB_OBJECT","VT_CF","VT_CLSID"
};
-const char* wine_vflags[16] =
+const char * const wine_vflags[16] =
{
"",
"|VT_VECTOR",
@@ -3094,12 +3094,12 @@ HRESULT WINAPI VarAdd(LPVARIANT left, LP
vt_R8, vt_CY, vt_DATE, vt_DECIMAL, vt_DISPATCH, vt_NULL,
vt_ERROR };
/* Mapping from priority to variant type. Keep in sync with coerceprio! */
- VARTYPE prio2vt[] = { VT_EMPTY, VT_UI1, VT_I2, VT_I4, VT_I8, VT_BSTR, VT_R4,
+ static const VARTYPE prio2vt[] = { VT_EMPTY, VT_UI1, VT_I2, VT_I4, VT_I8, VT_BSTR, VT_R4,
VT_R8, VT_CY, VT_DATE, VT_DECIMAL, VT_DISPATCH,
VT_NULL, VT_ERROR };
/* Mapping for coercion from input variant to priority of result variant. */
- static VARTYPE coerce[] = {
+ static const VARTYPE coerce[] = {
/* VT_EMPTY, VT_NULL, VT_I2, VT_I4, VT_R4 */
vt_EMPTY, vt_NULL, vt_I2, vt_I4, vt_R4,
/* VT_R8, VT_CY, VT_DATE, VT_BSTR, VT_DISPATCH */
@@ -3285,11 +3285,11 @@ HRESULT WINAPI VarMul(LPVARIANT left, LP
enum coerceprio { vt_UI1 = 0, vt_I2, vt_I4, vt_I8, vt_CY, vt_R4, vt_R8,
vt_DECIMAL, vt_NULL, vt_ERROR };
/* Mapping from priority to variant type. Keep in sync with coerceprio! */
- VARTYPE prio2vt[] = { VT_UI1, VT_I2, VT_I4, VT_I8, VT_CY, VT_R4, VT_R8,
+ static const VARTYPE prio2vt[] = { VT_UI1, VT_I2, VT_I4, VT_I8, VT_CY, VT_R4, VT_R8,
VT_DECIMAL, VT_NULL, VT_ERROR };
/* Mapping for coercion from input variant to priority of result variant. */
- static VARTYPE coerce[] = {
+ static const VARTYPE coerce[] = {
/* VT_EMPTY, VT_NULL, VT_I2, VT_I4, VT_R4 */
vt_UI1, vt_NULL, vt_I2, vt_I4, vt_R4,
/* VT_R8, VT_CY, VT_DATE, VT_BSTR, VT_DISPATCH */
diff --git a/dlls/oleaut32/variant.h b/dlls/oleaut32/variant.h
index 6015df5..c5f2e5d 100644
--- a/dlls/oleaut32/variant.h
+++ b/dlls/oleaut32/variant.h
@@ -48,12 +48,12 @@
#define VTBIT_VARIANT (1 << VT_VARIANT)
#define VTBIT_15 (1 << 15) /* no variant type with this number */
-extern const char* wine_vtypes[];
+extern const char * const wine_vtypes[];
#define debugstr_vt(v) (((v)&VT_TYPEMASK) <= VT_CLSID ? wine_vtypes[((v)&VT_TYPEMASK)] : \
((v)&VT_TYPEMASK) == VT_BSTR_BLOB ? "VT_BSTR_BLOB": "Invalid")
#define debugstr_VT(v) (!(v) ? "(null)" : debugstr_vt(V_TYPE((v))))
-extern const char* wine_vflags[];
+extern const char * const wine_vflags[];
#define debugstr_vf(v) (wine_vflags[((v)&VT_EXTRA_TYPE)>>12])
#define debugstr_VF(v) (!(v) ? "(null)" : debugstr_vf(V_EXTRA_TYPE(v)))
More information about the wine-cvs
mailing list