Commit 66b05dde authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ole32: Constify some variables.

parent d89f2b48
...@@ -76,8 +76,9 @@ HINSTANCE OLE32_hInstance = 0; /* FIXME: make static ... */ ...@@ -76,8 +76,9 @@ HINSTANCE OLE32_hInstance = 0; /* FIXME: make static ... */
* TODO: Most of these things will have to be made thread-safe. * TODO: Most of these things will have to be made thread-safe.
*/ */
static HRESULT COM_GetRegisteredClassObject(struct apartment *apt, REFCLSID rclsid, DWORD dwClsContext, LPUNKNOWN* ppUnk); static HRESULT COM_GetRegisteredClassObject(const struct apartment *apt, REFCLSID rclsid,
static void COM_RevokeAllClasses(struct apartment *apt); DWORD dwClsContext, LPUNKNOWN* ppUnk);
static void COM_RevokeAllClasses(const struct apartment *apt);
static HRESULT get_inproc_class_object(APARTMENT *apt, HKEY hkeydll, REFCLSID rclsid, REFIID riid, void **ppv); static HRESULT get_inproc_class_object(APARTMENT *apt, HKEY hkeydll, REFCLSID rclsid, REFIID riid, void **ppv);
static APARTMENT *MTA; /* protected by csApartment */ static APARTMENT *MTA; /* protected by csApartment */
...@@ -327,7 +328,7 @@ static APARTMENT *apartment_get_or_create(DWORD model) ...@@ -327,7 +328,7 @@ static APARTMENT *apartment_get_or_create(DWORD model)
return apt; return apt;
} }
static inline BOOL apartment_is_model(APARTMENT *apt, DWORD model) static inline BOOL apartment_is_model(const APARTMENT *apt, DWORD model)
{ {
return (apt->multi_threaded == !(model & COINIT_APARTMENTTHREADED)); return (apt->multi_threaded == !(model & COINIT_APARTMENTTHREADED));
} }
...@@ -728,7 +729,7 @@ HRESULT apartment_createwindowifneeded(struct apartment *apt) ...@@ -728,7 +729,7 @@ HRESULT apartment_createwindowifneeded(struct apartment *apt)
return S_OK; return S_OK;
} }
HWND apartment_getwindow(struct apartment *apt) HWND apartment_getwindow(const struct apartment *apt)
{ {
assert(!apt->multi_threaded); assert(!apt->multi_threaded);
return apt->win; return apt->win;
...@@ -1754,11 +1755,8 @@ HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid) ...@@ -1754,11 +1755,8 @@ HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
* to normal COM usage, this method will increase the * to normal COM usage, this method will increase the
* reference count on this object. * reference count on this object.
*/ */
static HRESULT COM_GetRegisteredClassObject( static HRESULT COM_GetRegisteredClassObject(const struct apartment *apt, REFCLSID rclsid,
struct apartment *apt, DWORD dwClsContext, LPUNKNOWN* ppUnk)
REFCLSID rclsid,
DWORD dwClsContext,
LPUNKNOWN* ppUnk)
{ {
HRESULT hr = S_FALSE; HRESULT hr = S_FALSE;
RegisteredClass *curClass; RegisteredClass *curClass;
...@@ -1951,7 +1949,7 @@ static void COM_RevokeRegisteredClassObject(RegisteredClass *curClass) ...@@ -1951,7 +1949,7 @@ static void COM_RevokeRegisteredClassObject(RegisteredClass *curClass)
HeapFree(GetProcessHeap(), 0, curClass); HeapFree(GetProcessHeap(), 0, curClass);
} }
static void COM_RevokeAllClasses(struct apartment *apt) static void COM_RevokeAllClasses(const struct apartment *apt)
{ {
RegisteredClass *curClass, *cursor; RegisteredClass *curClass, *cursor;
......
...@@ -255,13 +255,13 @@ DWORD apartment_addref(struct apartment *apt); ...@@ -255,13 +255,13 @@ DWORD apartment_addref(struct apartment *apt);
DWORD apartment_release(struct apartment *apt); DWORD apartment_release(struct apartment *apt);
HRESULT apartment_disconnectproxies(struct apartment *apt); HRESULT apartment_disconnectproxies(struct apartment *apt);
void apartment_disconnectobject(struct apartment *apt, void *object); void apartment_disconnectobject(struct apartment *apt, void *object);
static inline HRESULT apartment_getoxid(struct apartment *apt, OXID *oxid) static inline HRESULT apartment_getoxid(const struct apartment *apt, OXID *oxid)
{ {
*oxid = apt->oxid; *oxid = apt->oxid;
return S_OK; return S_OK;
} }
HRESULT apartment_createwindowifneeded(struct apartment *apt); HRESULT apartment_createwindowifneeded(struct apartment *apt);
HWND apartment_getwindow(struct apartment *apt); HWND apartment_getwindow(const struct apartment *apt);
void apartment_joinmta(void); void apartment_joinmta(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment