Fix for MSVC.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@549 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
n-a-c-h 2008-05-29 03:20:05 +00:00
parent cae0778388
commit 7dad9f7167
1 changed files with 7 additions and 7 deletions

View File

@ -10,13 +10,13 @@ extern "C" {
int ExecutableValid(const char *executable_filename);
char *unprotect_buffer(unsigned char *buffer, size_t buffer_len);
#define SET_FN_PTR(func, num) \
static inline void *get_##func(void) { \
int i, j = num / 4; \
long ptr = (long)func + num; \
for (i = 0; i < 2; i++) ptr -= j; \
return (void *)(ptr - (j * 2)); \
}
#define SET_FN_PTR(func, num) \
static __inline void *get_##func(void) { \
int i, j = num / 4; \
long ptr = (long)func + num; \
for (i = 0; i < 2; i++) { ptr -= j; } \
return (void *)(ptr - (j * 2)); \
}
#define GET_FN_PTR(func) get_##func()