Skip to content

Commit 173b246

Browse files
johnbashdrprajap
authored andcommitted
Changes to address inlining of exported APIs
Avoid inlining of exported member functions in Client’s code in DLL mode, this is to eliminate exposing internal members in exported APIs causing linker issues. Change-Id: Ia982002eb43f4816099f3de181f11bb1e25e5872 Signed-off-by: johnbash <[email protected]>
1 parent 4f787cc commit 173b246

File tree

3 files changed

+92
-89
lines changed

3 files changed

+92
-89
lines changed

Source/GmmLib/inc/External/Common/GmmClientContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace GmmLib
8484
/// Returns the GMM_CLIENT Type that has created this ClientContext.
8585
/// @return GMM_CLIENT
8686
/////////////////////////////////////////////////////////////////////////////////////
87-
GMM_INLINE_VIRTUAL GMM_INLINE GMM_CLIENT GMM_STDCALL GetClientType()
87+
GMM_INLINE_VIRTUAL GMM_INLINE_EXPORTED GMM_CLIENT GMM_STDCALL GetClientType()
8888
{
8989
return (ClientType);
9090
}

Source/GmmLib/inc/External/Common/GmmCommonExt.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ OTHER DEALINGS IN THE SOFTWARE.
3131

3232
#define GMM_VIRTUAL virtual
3333

34+
#define GMM_INLINE_EXPORTED /* Macro To avoid inlining of exported member functions in Client’s code in DLL mode*/
35+
3436
#ifdef _WIN32
3537

3638
#ifdef GMM_LIB_DLL_EXPORTS
@@ -52,6 +54,7 @@ OTHER DEALINGS IN THE SOFTWARE.
5254
#define GMM_INLINE_VIRTUAL
5355
#define GMM_VIRTUAL
5456
#define GMM_LIB_API
57+
#define GMM_INLINE_EXPORTED __inline
5558

5659
#endif /* GMM_LIB_DLL */
5760

0 commit comments

Comments
 (0)