From 25e291438231611823dadc195fd26d26a1b8ece4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 8 Jan 2015 14:06:24 +0100 Subject: Properly change Link class to use sal_IntPtr instead of long ...follow-up to 4e41227dd6af52ec562d10efcb365defba6bd36e "mingw64: change Link class to use sal_IntPtr instead of long;" should make obsolete "Signed/Unsigned mismatch on x86_64 platform on windows" Change-Id: I9fcc947bb96e104816c2820cb338fc34c528bae0 --- include/tools/link.hxx | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'include/tools') diff --git a/include/tools/link.hxx b/include/tools/link.hxx index db8028321594..c14eb010356c 100644 --- a/include/tools/link.hxx +++ b/include/tools/link.hxx @@ -24,50 +24,50 @@ #include #include -typedef long (*PSTUB)( void*, void* ); +typedef sal_IntPtr (*PSTUB)( void*, void* ); #define DECL_LINK( Method, ArgType ) \ - long Method( ArgType ); \ - static long LinkStub##Method( void* pThis, void* ) + sal_IntPtr Method( ArgType ); \ + static sal_IntPtr LinkStub##Method( void* pThis, void* ) #define DECL_STATIC_LINK( Class, Method, ArgType ) \ - static long LinkStub##Method( void* pThis, void* ); \ - static long Method( Class*, ArgType ) + static sal_IntPtr LinkStub##Method( void* pThis, void* ); \ + static sal_IntPtr Method( Class*, ArgType ) #define DECL_DLLPRIVATE_LINK(Method, ArgType) \ - SAL_DLLPRIVATE long Method(ArgType); \ - SAL_DLLPRIVATE static long LinkStub##Method(void * pThis, void *) + SAL_DLLPRIVATE sal_IntPtr Method(ArgType); \ + SAL_DLLPRIVATE static sal_IntPtr LinkStub##Method(void * pThis, void *) #define DECL_DLLPRIVATE_STATIC_LINK(Class, Method, ArgType) \ - SAL_DLLPRIVATE static long LinkStub##Method( void* pThis, void* ); \ - SAL_DLLPRIVATE static long Method(Class *, ArgType) + SAL_DLLPRIVATE static sal_IntPtr LinkStub##Method( void* pThis, void* ); \ + SAL_DLLPRIVATE static sal_IntPtr Method(Class *, ArgType) #define IMPL_STUB(Class, Method, ArgType) \ - long Class::LinkStub##Method( void* pThis, void* pCaller) \ + sal_IntPtr Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ return static_cast(pThis)->Method( (ArgType)pCaller ); \ } #define IMPL_STATIC_LINK( Class, Method, ArgType, ArgName ) \ - long Class::LinkStub##Method( void* pThis, void* pCaller) \ + sal_IntPtr Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ return Method( static_cast(pThis), (ArgType)pCaller ); \ } \ - long Class::Method( Class* pThis, ArgType ArgName ) + sal_IntPtr Class::Method( Class* pThis, ArgType ArgName ) #define IMPL_STATIC_LINK_NOINSTANCE( Class, Method, ArgType, ArgName ) \ - long Class::LinkStub##Method( void* pThis, void* pCaller) \ + sal_IntPtr Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ return Method( static_cast(pThis), (ArgType)pCaller ); \ } \ - long Class::Method( SAL_UNUSED_PARAMETER Class*, ArgType ArgName ) + sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER Class*, ArgType ArgName ) #define IMPL_STATIC_LINK_NOINSTANCE_NOARG( Class, Method ) \ - long Class::LinkStub##Method( void* pThis, void* pCaller) \ + sal_IntPtr Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ return Method( static_cast(pThis), pCaller ); \ } \ - long Class::Method( SAL_UNUSED_PARAMETER Class*, SAL_UNUSED_PARAMETER void* ) + sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER Class*, SAL_UNUSED_PARAMETER void* ) #define LINK( Inst, Class, Member ) \ Link( static_cast(Inst), (PSTUB)&Class::LinkStub##Member ) @@ -76,26 +76,26 @@ typedef long (*PSTUB)( void*, void* ); #define IMPL_LINK( Class, Method, ArgType, ArgName ) \ IMPL_STUB( Class, Method, ArgType ) \ - long Class::Method( ArgType ArgName ) + sal_IntPtr Class::Method( ArgType ArgName ) #define IMPL_LINK_NOARG( Class, Method ) \ IMPL_STUB( Class, Method, void* ) \ - long Class::Method( SAL_UNUSED_PARAMETER void* ) + sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER void* ) #define IMPL_LINK_INLINE_START( Class, Method, ArgType, ArgName ) \ - inline long Class::Method( ArgType ArgName ) + inline sal_IntPtr Class::Method( ArgType ArgName ) #define IMPL_LINK_INLINE_END( Class, Method, ArgType, ArgName ) \ IMPL_STUB( Class, Method, ArgType ) #define IMPL_LINK_NOARG_INLINE_START( Class, Method ) \ - inline long Class::Method( SAL_UNUSED_PARAMETER void* ) + inline sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER void* ) #define IMPL_LINK_NOARG_INLINE_END( Class, Method ) \ IMPL_STUB( Class, Method, void* ) #define IMPL_LINK_INLINE( Class, Method, ArgType, ArgName, Body ) \ - long Class::Method( ArgType ArgName ) \ + sal_IntPtr Class::Method( ArgType ArgName ) \ Body \ IMPL_STUB( Class, Method, ArgType ) -- cgit