C89 MSVC doesn't support 'inline' - will have to make define for

INLINE that can be redefined by MSVC
This commit is contained in:
twinaphex
2014-03-17 17:37:20 +01:00
parent 5345c2b9bc
commit 4835077e00
12 changed files with 12 additions and 13 deletions

View File

@@ -216,7 +216,7 @@ void Cz80_Reset(cz80_struc *CPU)
/* */
#if PICODRIVE_HACKS
static inline unsigned char picodrive_read(unsigned short a)
static INLINE unsigned char picodrive_read(unsigned short a)
{
uptr v = z80_read_map[a >> Z80_MEM_SHIFT];
if (map_flag_set(v))

View File

@@ -26,6 +26,6 @@ int pdb_net_connect(const char *host, const char *port);
#else
static inline int pdb_net_connect(const char *host, const char *port) {return 0;}
static INLINE int pdb_net_connect(const char *host, const char *port) {return 0;}
#endif

View File

@@ -1017,7 +1017,7 @@ static void rcache_unlock_all(void)
reg_temp[i].flags &= ~HRF_LOCKED;
}
static inline u32 rcache_used_hreg_mask(void)
static INLINE u32 rcache_used_hreg_mask(void)
{
u32 mask = 0;
int i;

View File

@@ -108,6 +108,7 @@
//#include "debugger.h"
//#include "sh2.h"
//#include "sh2comn.h"
#undef INLINE
#define INLINE static
//CPU_DISASSEMBLE( sh2 );

View File

@@ -21,7 +21,7 @@ typedef unsigned char UINT8;
// this nasty conversion is needed for drc-expecting memhandlers
#define MAKE_READFUNC(name, cname) \
static inline unsigned int name(SH2 *sh2, unsigned int a) \
static INLINE unsigned int name(SH2 *sh2, unsigned int a) \
{ \
unsigned int ret; \
sh2->sr |= sh2->icount << 12; \
@@ -32,7 +32,7 @@ static inline unsigned int name(SH2 *sh2, unsigned int a) \
}
#define MAKE_WRITEFUNC(name, cname) \
static inline void name(SH2 *sh2, unsigned int a, unsigned int d) \
static INLINE void name(SH2 *sh2, unsigned int a, unsigned int d) \
{ \
sh2->sr |= sh2->icount << 12; \
cname(a, d, sh2); \

View File

@@ -92,7 +92,7 @@ void sh2_unpack(SH2 *sh2, const unsigned char *buff);
int sh2_execute_drc(SH2 *sh2c, int cycles);
int sh2_execute_interpreter(SH2 *sh2c, int cycles);
static inline int sh2_execute(SH2 *sh2, int cycles, int use_drc)
static INLINE int sh2_execute(SH2 *sh2, int cycles, int use_drc)
{
int ret;