[v2] oleaut32: Make the heap allocation functions static.

Francois Gouget fgouget at free.fr
Tue Jan 10 11:46:48 CST 2017


Signed-off-by: Francois Gouget <fgouget at free.fr>
---

Forgot the Signed-off-by in v1.

 dlls/oleaut32/typelib.c | 8 ++++----
 dlls/oleaut32/typelib.h | 5 -----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 4fdfbeb5442..8906b5faf4d 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -1600,26 +1600,26 @@ static void TLB_abort(void)
     DebugBreak();
 }
 
-void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(unsigned size)
+static void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(unsigned size)
 {
     void *ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
     if (!ret) ERR("cannot allocate memory\n");
     return ret;
 }
 
-void* __WINE_ALLOC_SIZE(1) heap_alloc(unsigned size)
+static void* __WINE_ALLOC_SIZE(1) heap_alloc(unsigned size)
 {
     void *ret = HeapAlloc(GetProcessHeap(), 0, size);
     if (!ret) ERR("cannot allocate memory\n");
     return ret;
 }
 
-void* __WINE_ALLOC_SIZE(2) heap_realloc(void *ptr, unsigned size)
+static void* __WINE_ALLOC_SIZE(2) heap_realloc(void *ptr, unsigned size)
 {
     return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
 }
 
-void heap_free(void *ptr)
+static void heap_free(void *ptr)
 {
     HeapFree(GetProcessHeap(), 0, ptr);
 }
diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h
index 31c9ab94d18..7c2189352cd 100644
--- a/dlls/oleaut32/typelib.h
+++ b/dlls/oleaut32/typelib.h
@@ -596,11 +596,6 @@ WORD typeofarray
 
 #include "poppack.h"
 
-/* heap allocation helpers */
-extern void* heap_alloc_zero(unsigned size) DECLSPEC_HIDDEN __WINE_ALLOC_SIZE(1);
-extern void* heap_alloc(unsigned size) DECLSPEC_HIDDEN __WINE_ALLOC_SIZE(1);
-extern void* heap_realloc(void *ptr, unsigned size) DECLSPEC_HIDDEN;
-extern void  heap_free(void *ptr) DECLSPEC_HIDDEN;
 
 HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc ) DECLSPEC_HIDDEN;
 
-- 
2.11.0



More information about the wine-patches mailing list