Fixed pragmas
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@551 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
2f9fdf3d6b
commit
8d13754a76
|
@ -10,15 +10,16 @@ extern "C" {
|
||||||
int ExecutableValid(const char *executable_filename);
|
int ExecutableValid(const char *executable_filename);
|
||||||
char *unprotect_buffer(unsigned char *buffer, size_t buffer_len);
|
char *unprotect_buffer(unsigned char *buffer, size_t buffer_len);
|
||||||
|
|
||||||
|
#pragma optimize("", off)
|
||||||
#define SET_FN_PTR(func, num) \
|
#define SET_FN_PTR(func, num) \
|
||||||
#pragma optimize("", off) \
|
|
||||||
static __inline void *get_##func(void) { \
|
static __inline void *get_##func(void) { \
|
||||||
int i, j = num / 4; \
|
int i, j = num / 4; \
|
||||||
long ptr = (long)func + num; \
|
long ptr = (long)func + num; \
|
||||||
for (i = 0; i < 2; i++) { ptr -= j; } \
|
for (i = 0; i < 2; i++) { ptr -= j; } \
|
||||||
return (void *)(ptr - (j * 2)); \
|
return (void *)(ptr - (j * 2)); \
|
||||||
} \
|
} \
|
||||||
#pragma optimize("", on)
|
|
||||||
|
#pragma optimize("", on)
|
||||||
|
|
||||||
#define GET_FN_PTR(func) get_##func()
|
#define GET_FN_PTR(func) get_##func()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue