Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/oleaut32/typelib.c | 1 + dlls/oleaut32/typelib.h | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 49366aeecd..4ee6aa540d 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -73,6 +73,7 @@ #include "typelib.h" #include "wine/debug.h" #include "variant.h" +#include "wine/heap.h" #include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h index d977dfb063..2003c75556 100644 --- a/dlls/oleaut32/typelib.h +++ b/dlls/oleaut32/typelib.h @@ -596,26 +596,6 @@ WORD typeofarray
#include "poppack.h"
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc( SIZE_T size ) -{ - return HeapAlloc( GetProcessHeap(), 0, size ); -} - -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero( SIZE_T size ) -{ - return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size ); -} - -static inline void* __WINE_ALLOC_SIZE(2) heap_realloc( LPVOID mem, SIZE_T size ) -{ - return HeapReAlloc( GetProcessHeap(), 0, mem, size ); -} - -static inline BOOL heap_free( LPVOID mem ) -{ - return HeapFree( GetProcessHeap(), 0, mem ); -} - HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc ) DECLSPEC_HIDDEN;
extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args) DECLSPEC_HIDDEN;
On Sat, Feb 03, 2018 at 12:17:55AM +0100, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc mstefani@winehq.org
dlls/oleaut32/typelib.c | 1 + dlls/oleaut32/typelib.h | 20 -------------------- 2 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 49366aeecd..4ee6aa540d 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -73,6 +73,7 @@ #include "typelib.h" #include "wine/debug.h" #include "variant.h" +#include "wine/heap.h" #include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h index d977dfb063..2003c75556 100644 --- a/dlls/oleaut32/typelib.h +++ b/dlls/oleaut32/typelib.h @@ -596,26 +596,6 @@ WORD typeofarray
#include "poppack.h"
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc( SIZE_T size ) -{
- return HeapAlloc( GetProcessHeap(), 0, size );
-}
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero( SIZE_T size ) -{
- return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size );
-}
-static inline void* __WINE_ALLOC_SIZE(2) heap_realloc( LPVOID mem, SIZE_T size ) -{
- return HeapReAlloc( GetProcessHeap(), 0, mem, size );
-}
While you're converting heap_realloc() to the alloc on mem == NULL behaviour, wouldn't it make sense to simplify any callers that do this manually? There are several in typelib.c . It's obviously possible to do later, but they're easier to find now before making this change.
Huw.
On 02/05/2018 09:49 AM, Huw Davies wrote:
While you're converting heap_realloc() to the alloc on mem == NULL behaviour, wouldn't it make sense to simplify any callers that do this manually? There are several in typelib.c . It's obviously possible to do later, but they're easier to find now before making this change.
Technically it makes no difference. I wouldn't detect nor change (if possible) those manually but have a coccinelle script do that for me. At over 500 heap_realloc / HeapRealloc calls it needs to be automated.
But thanks for pointing me to typelib.c, it has some interesting cases in it that I can use to validate my script.
bye michael