From ac527f1e6c247989ca6ea331c3e3260e403436d0 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 28 Nov 2007 00:09:35 +0100 Subject: [PATCH] shdocvw: Rename the wrappers around HeapAlloc() &Co to use the new standard naming. --- dlls/shdocvw/events.c | 10 +++++----- dlls/shdocvw/ie.c | 2 +- dlls/shdocvw/iexplore.c | 4 ++-- dlls/shdocvw/navigate.c | 8 ++++---- dlls/shdocvw/shdocvw.h | 6 +++--- dlls/shdocvw/shlinstobj.c | 14 +++++++------- dlls/shdocvw/webbrowser.c | 6 +++--- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/shdocvw/events.c b/dlls/shdocvw/events.c index be531dbfceb..f12ff950832 100644 --- a/dlls/shdocvw/events.c +++ b/dlls/shdocvw/events.c @@ -206,10 +206,10 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown * } if(i == This->sinks_size) - This->sinks = shdocvw_realloc(This->sinks, + This->sinks = heap_realloc(This->sinks, (++This->sinks_size)*sizeof(*This->sinks)); }else { - This->sinks = shdocvw_alloc(sizeof(*This->sinks)); + This->sinks = heap_alloc(sizeof(*This->sinks)); This->sinks_size = 1; i = 0; } @@ -271,7 +271,7 @@ void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams) static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp, IConnectionPointContainer *container) { - ConnectionPoint *ret = shdocvw_alloc(sizeof(ConnectionPoint)); + ConnectionPoint *ret = heap_alloc(sizeof(ConnectionPoint)); ret->lpConnectionPointVtbl = &ConnectionPointVtbl; @@ -293,8 +293,8 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This) IDispatch_Release(This->sinks[i]); } - shdocvw_free(This->sinks); - shdocvw_free(This); + heap_free(This->sinks); + heap_free(This); } void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl) diff --git a/dlls/shdocvw/ie.c b/dlls/shdocvw/ie.c index 7627691efb5..493e7537f2a 100644 --- a/dlls/shdocvw/ie.c +++ b/dlls/shdocvw/ie.c @@ -75,7 +75,7 @@ static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface) if(!ref) { DocHost_Release(&This->doc_host); - shdocvw_free(This); + heap_free(This); } return ref; diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c index c8fa61d9231..e6387d50937 100644 --- a/dlls/shdocvw/iexplore.c +++ b/dlls/shdocvw/iexplore.c @@ -161,7 +161,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv) TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv); - ret = shdocvw_alloc(sizeof(InternetExplorer)); + ret = heap_alloc(sizeof(InternetExplorer)); ret->ref = 0; ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret); @@ -174,7 +174,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv) hres = IWebBrowser2_QueryInterface(WEBBROWSER2(ret), riid, ppv); if(FAILED(hres)) { - shdocvw_free(ret); + heap_free(ret); return hres; } diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index fce2bb96499..429a71e52a4 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -137,8 +137,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) if(!ref) { if(This->post_data) GlobalFree(This->post_data); - shdocvw_free(This->headers); - shdocvw_free(This); + heap_free(This->headers); + heap_free(This); } return ref; @@ -293,7 +293,7 @@ static const IHttpNegotiateVtbl HttpNegotiateVtbl = { static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data, ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel) { - BindStatusCallback *ret = shdocvw_alloc(sizeof(BindStatusCallback)); + BindStatusCallback *ret = heap_alloc(sizeof(BindStatusCallback)); ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl; ret->lpHttpNegotiateVtbl = &HttpNegotiateVtbl; @@ -310,7 +310,7 @@ static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data, if(headers) { int size = (strlenW(headers)+1)*sizeof(WCHAR); - ret->headers = shdocvw_alloc(size); + ret->headers = heap_alloc(size); memcpy(ret->headers, headers, size); } diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 0b048eb1a34..494bae9cbdc 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -226,17 +226,17 @@ DWORD register_iexplore(BOOL); /* memory allocation functions */ -static inline void *shdocvw_alloc(size_t len) +static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len); } -static inline void *shdocvw_realloc(void *mem, size_t len) +static inline void *heap_realloc(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), 0, mem, len); } -static inline BOOL shdocvw_free(void *mem) +static inline BOOL heap_free(void *mem) { return HeapFree(GetProcessHeap(), 0, mem); } diff --git a/dlls/shdocvw/shlinstobj.c b/dlls/shdocvw/shlinstobj.c index a69791871c3..eaca590ca33 100644 --- a/dlls/shdocvw/shlinstobj.c +++ b/dlls/shdocvw/shlinstobj.c @@ -59,7 +59,7 @@ static void RegistryPropertyBag_Destroy(RegistryPropertyBag *This) { TRACE("This=%p)\n", This); RegCloseKey(This->m_hInitPropertyBagKey); - shdocvw_free(This); + heap_free(This); } static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface, @@ -130,20 +130,20 @@ static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_Read(IPropertyBag *iface, if (res != ERROR_SUCCESS) return E_INVALIDARG; - pwszValue = shdocvw_alloc(cbData); + pwszValue = heap_alloc(cbData); if (!pwszValue) return E_OUTOFMEMORY; res = RegQueryValueExW(This->m_hInitPropertyBagKey, pwszPropName, NULL, &dwType, (LPBYTE)pwszValue, &cbData); if (res != ERROR_SUCCESS) { - shdocvw_free(pwszValue); + heap_free(pwszValue); return E_INVALIDARG; } V_VT(pVar) = VT_BSTR; V_BSTR(pVar) = SysAllocString(pwszValue); - shdocvw_free(pwszValue); + heap_free(pwszValue); if (vtDst != VT_BSTR) { hr = VariantChangeTypeEx(pVar, pVar, LOCALE_SYSTEM_DEFAULT, 0, vtDst); @@ -176,7 +176,7 @@ static HRESULT RegistryPropertyBag_Constructor(HKEY hInitPropertyBagKey, REFIID TRACE("(hInitPropertyBagKey=%p, riid=%s, ppvObject=%p)\n", hInitPropertyBagKey, debugstr_guid(riid), ppvObject); - pRegistryPropertyBag = shdocvw_alloc(sizeof(RegistryPropertyBag)); + pRegistryPropertyBag = heap_alloc(sizeof(RegistryPropertyBag)); if (pRegistryPropertyBag) { pRegistryPropertyBag->lpIPropertyBagVtbl = &RegistryPropertyBag_IPropertyBagVtbl; pRegistryPropertyBag->m_cRef = 0; @@ -206,7 +206,7 @@ typedef struct _InstanceObjectFactory { static void InstanceObjectFactory_Destroy(InstanceObjectFactory *This) { IPropertyBag_Release(This->m_pPropertyBag); - shdocvw_free(This); + heap_free(This); } static HRESULT WINAPI InstanceObjectFactory_IClassFactory_QueryInterface(IClassFactory *iface, @@ -322,7 +322,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag * TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag, debugstr_guid(riid), ppvObject); - pInstanceObjectFactory = shdocvw_alloc(sizeof(InstanceObjectFactory)); + pInstanceObjectFactory = heap_alloc(sizeof(InstanceObjectFactory)); if (pInstanceObjectFactory) { pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl; pInstanceObjectFactory->m_cRef = 0; diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index 59cc117be69..e2b79ae05d9 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -148,7 +148,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface) WebBrowser_OleObject_Destroy(This); - shdocvw_free(This); + heap_free(This); SHDOCVW_UnlockModule(); } @@ -945,7 +945,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi TRACE("(%p %s %p) version=%d\n", pOuter, debugstr_guid(riid), ppv, version); - ret = shdocvw_alloc(sizeof(WebBrowser)); + ret = heap_alloc(sizeof(WebBrowser)); ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl; ret->ref = 0; @@ -970,7 +970,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi if(SUCCEEDED(hres)) { SHDOCVW_LockModule(); }else { - shdocvw_free(ret); + heap_free(ret); return hres; }