Michael Stefaniuc : hlink: Rename the wrappers around HeapAlloc() &Co to use the standard names.
Alexandre Julliard
julliard at winehq.org
Mon Dec 10 08:54:18 CST 2007
Module: wine
Branch: master
Commit: e3bd2d5090dd7a01a20dcc676885391c76df9727
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3bd2d5090dd7a01a20dcc676885391c76df9727
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sun Dec 9 16:29:51 2007 +0100
hlink: Rename the wrappers around HeapAlloc() &Co to use the standard names.
---
dlls/hlink/browse_ctx.c | 10 +++++-----
dlls/hlink/extserv.c | 10 +++++-----
dlls/hlink/hlink_private.h | 8 ++++----
dlls/hlink/link.c | 28 ++++++++++++++--------------
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/dlls/hlink/browse_ctx.c b/dlls/hlink/browse_ctx.c
index 3b2f4b4..f0274b0 100644
--- a/dlls/hlink/browse_ctx.c
+++ b/dlls/hlink/browse_ctx.c
@@ -46,7 +46,7 @@ HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid,
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
- hl = hlink_alloc_zero(sizeof(HlinkBCImpl));
+ hl = heap_alloc_zero(sizeof(HlinkBCImpl));
if (!hl)
return E_OUTOFMEMORY;
@@ -95,10 +95,10 @@ static ULONG WINAPI IHlinkBC_fnRelease (IHlinkBrowseContext* iface)
return refCount;
TRACE("-- destroying IHlinkBrowseContext (%p)\n", This);
- hlink_free(This->BrowseWindowInfo);
+ heap_free(This->BrowseWindowInfo);
if (This->CurrentPage)
IHlink_Release(This->CurrentPage);
- hlink_free(This);
+ heap_free(This);
return 0;
}
@@ -155,8 +155,8 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface,
HlinkBCImpl *This = (HlinkBCImpl*)iface;
TRACE("(%p)->(%p)\n", This, phlbwi);
- hlink_free(This->BrowseWindowInfo);
- This->BrowseWindowInfo = hlink_alloc(phlbwi->cbSize);
+ heap_free(This->BrowseWindowInfo);
+ This->BrowseWindowInfo = heap_alloc(phlbwi->cbSize);
memcpy(This->BrowseWindowInfo, phlbwi, phlbwi->cbSize);
return S_OK;
diff --git a/dlls/hlink/extserv.c b/dlls/hlink/extserv.c
index b306d35..d58d1dd 100644
--- a/dlls/hlink/extserv.c
+++ b/dlls/hlink/extserv.c
@@ -89,9 +89,9 @@ static ULONG WINAPI ExtServUnk_Release(IUnknown *iface)
TRACE("(%p) ref=%d\n", This, ref);
if(!ref) {
- hlink_free(This->username);
- hlink_free(This->password);
- hlink_free(This);
+ heap_free(This->username);
+ heap_free(This->password);
+ heap_free(This);
}
return ref;
@@ -220,7 +220,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
phwnd, debugstr_w(pszUsername), debugstr_w(pszPassword),
punkOuter, debugstr_guid(riid), ppv);
- ret = hlink_alloc(sizeof(*ret));
+ ret = heap_alloc(sizeof(*ret));
ret->lpIUnknownVtbl = &ExtServUnkVtbl;
ret->lpIAuthenticateVtbl = &AuthenticateVtbl;
@@ -235,7 +235,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders,
if(len && pwzAdditionalHeaders[len-1] != '\n' && pwzAdditionalHeaders[len-1] != '\r') {
static const WCHAR endlW[] = {'\r','\n',0};
- ret->headers = hlink_alloc(len*sizeof(WCHAR) + sizeof(endlW));
+ ret->headers = heap_alloc(len*sizeof(WCHAR) + sizeof(endlW));
memcpy(ret->headers, pwzAdditionalHeaders, len*sizeof(WCHAR));
memcpy(ret->headers+len, endlW, sizeof(endlW));
}else {
diff --git a/dlls/hlink/hlink_private.h b/dlls/hlink/hlink_private.h
index ef381bd..0df374c 100644
--- a/dlls/hlink/hlink_private.h
+++ b/dlls/hlink/hlink_private.h
@@ -32,17 +32,17 @@
extern HRESULT WINAPI HLink_Constructor(IUnknown*,REFIID,void**);
extern HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**);
-static inline void *hlink_alloc(size_t len)
+static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
-static inline void *hlink_alloc_zero(size_t len)
+static inline void *heap_alloc_zero(size_t len)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
-static inline BOOL hlink_free(void *mem)
+static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
@@ -55,7 +55,7 @@ static inline LPWSTR hlink_strdupW(LPCWSTR str)
DWORD size;
size = (strlenW(str)+1)*sizeof(WCHAR);
- ret = hlink_alloc(size);
+ ret = heap_alloc(size);
memcpy(ret, str, size);
}
diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c
index 179a179..1720006 100644
--- a/dlls/hlink/link.c
+++ b/dlls/hlink/link.c
@@ -98,7 +98,7 @@ HRESULT WINAPI HLink_Constructor(IUnknown *pUnkOuter, REFIID riid,
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
- hl = hlink_alloc_zero(sizeof(HlinkImpl));
+ hl = heap_alloc_zero(sizeof(HlinkImpl));
if (!hl)
return E_OUTOFMEMORY;
@@ -155,15 +155,15 @@ static ULONG WINAPI IHlink_fnRelease (IHlink* iface)
return refCount;
TRACE("-- destroying IHlink (%p)\n", This);
- hlink_free(This->FriendlyName);
- hlink_free(This->Target);
- hlink_free(This->TargetFrameName);
- hlink_free(This->Location);
+ heap_free(This->FriendlyName);
+ heap_free(This->Target);
+ heap_free(This->TargetFrameName);
+ heap_free(This->Location);
if (This->Moniker)
IMoniker_Release(This->Moniker);
if (This->Site)
IHlinkSite_Release(This->Site);
- hlink_free(This);
+ heap_free(This);
return 0;
}
@@ -223,7 +223,7 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface,
CoTaskMemFree(display_name);
}
- hlink_free(This->Location);
+ heap_free(This->Location);
This->Location = hlink_strdupW( pwzLocation );
return S_OK;
@@ -239,12 +239,12 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface,
if (grfHLSETF & HLINKSETF_TARGET)
{
- hlink_free(This->Target);
+ heap_free(This->Target);
This->Target = hlink_strdupW( pwzTarget );
}
if (grfHLSETF & HLINKSETF_LOCATION)
{
- hlink_free(This->Location);
+ heap_free(This->Location);
This->Location = hlink_strdupW( pwzLocation );
}
@@ -313,7 +313,7 @@ static HRESULT WINAPI IHlink_fnSetFriendlyName (IHlink *iface,
TRACE("(%p) -> (%s)\n", This, debugstr_w(pwzFriendlyName));
- hlink_free(This->FriendlyName);
+ heap_free(This->FriendlyName);
This->FriendlyName = hlink_strdupW( pwzFriendlyName );
return S_OK;
@@ -356,7 +356,7 @@ static HRESULT WINAPI IHlink_fnSetTargetFrameName(IHlink* iface,
HlinkImpl *This = (HlinkImpl*)iface;
TRACE("(%p)->(%s)\n", This, debugstr_w(pwzTargetFramename));
- hlink_free(This->TargetFrameName);
+ heap_free(This->TargetFrameName);
This->TargetFrameName = hlink_strdupW( pwzTargetFramename );
return S_OK;
@@ -648,18 +648,18 @@ static HRESULT read_hlink_string(IStream *pStm, LPWSTR *out_str)
TRACE("read len %d\n", len);
- str = hlink_alloc(len * sizeof(WCHAR));
+ str = heap_alloc(len * sizeof(WCHAR));
if (!str) return E_OUTOFMEMORY;
hr = IStream_Read(pStm, str, len * sizeof(WCHAR), &read);
if (FAILED(hr))
{
- hlink_free(str);
+ heap_free(str);
return hr;
}
if (read != len * sizeof(WCHAR))
{
- hlink_free(str);
+ heap_free(str);
return STG_E_READFAULT;
}
TRACE("read string %s\n", debugstr_w(str));
More information about the wine-cvs
mailing list