Update FUNCTION_ENTRY_POINT() to be compatible with a wider variety of input parameters.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6883 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2008-12-05 23:23:59 +00:00
parent e8cb61feb1
commit 9a1d00cbb5
4 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ typedef unsigned long UINTN;
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer)
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
#endif

View File

@ -219,7 +219,7 @@ typedef INT32 INTN;
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer)
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
#endif

View File

@ -250,7 +250,7 @@ typedef struct {
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (((EFI_PLABEL *)(FunctionPointer))->EntryPoint)
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(((EFI_PLABEL *)(FunctionPointer))->EntryPoint)
#endif

View File

@ -248,7 +248,7 @@ typedef INT64 INTN;
@return The pointer to the first instruction of a function given a function pointer.
**/
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(FunctionPointer)
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
#endif