urlmon: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.

Steven Edwards winehacker at gmail.com
Thu Nov 29 19:51:06 CST 2007


Hi,

On Nov 29, 2007 4:12 PM, Michael Stefaniuc <mstefani at redhat.de> wrote:
> diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h
> index aeb0eb2..9f31fb9 100644
> --- a/dlls/urlmon/urlmon_main.h
> +++ b/dlls/urlmon/urlmon_main.h
> @@ -63,22 +63,22 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
>
>  HRESULT create_binding_protocol(LPCWSTR url, IInternetProtocol **protocol);
>
> -static inline void *urlmon_alloc(size_t len)
> +static inline void *heap_alloc(size_t len)
>  {
>      return HeapAlloc(GetProcessHeap(), 0, len);
>  }
>
> -static inline void *urlmon_alloc_zero(size_t len)
> +static inline void *heap_alloc_zero(size_t len)
>  {
>      return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
>  }
>
> -static inline void *urlmon_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 urlmon_free(void *mem)
> +static inline BOOL heap_free(void *mem)
>  {
>      return HeapFree(GetProcessHeap(), 0, mem);
>  }

Rather than duplicating these inline functions in each dlls private
header, could we add the heap wrappers somewhere like winbase.h and
mark it as a wine extension? Doing it there would make sense as
winbase.h is where HeapAlloc and friends is defined.

Thanks
-- 
Steven Edwards

"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo



More information about the wine-devel mailing list