mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
Explicitly allow PAIR and PAIR64 in save states.
This commit is contained in:
parent
92db7e71a9
commit
46b81c390e
@ -58,7 +58,8 @@ typedef enum _state_save_error state_save_error;
|
|||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define IS_VALID_SAVE_TYPE(_var) \
|
#define IS_VALID_SAVE_TYPE(_var) \
|
||||||
(std::tr1::is_arithmetic<typeof(_var)>::value || std::tr1::is_enum<typeof(_var)>::value)
|
(std::tr1::is_arithmetic<typeof(_var)>::value || std::tr1::is_enum<typeof(_var)>::value || \
|
||||||
|
std::tr1::is_same<typeof(_var), PAIR>::value || std::tr1::is_same<typeof(_var), PAIR64>::value)
|
||||||
#else
|
#else
|
||||||
#define IS_VALID_SAVE_TYPE(_var) \
|
#define IS_VALID_SAVE_TYPE(_var) \
|
||||||
(sizeof(_var) == 1 || sizeof(_var) == 2 || sizeof(_var) == 4 || sizeof(_var) == 8)
|
(sizeof(_var) == 1 || sizeof(_var) == 2 || sizeof(_var) == 4 || sizeof(_var) == 8)
|
||||||
|
@ -47,10 +47,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <typeinfo>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
COMPILER-SPECIFIC NASTINESS
|
COMPILER-SPECIFIC NASTINESS
|
||||||
@ -62,12 +58,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* In C++ we can do type checking via typeid */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define TYPES_COMPATIBLE(a,b) (typeid(a) == typeid(b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Some optimizations/warnings cleanups for GCC */
|
/* Some optimizations/warnings cleanups for GCC */
|
||||||
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||||
#define ATTR_UNUSED __attribute__((__unused__))
|
#define ATTR_UNUSED __attribute__((__unused__))
|
||||||
@ -82,9 +72,6 @@
|
|||||||
#define EXPECTED(exp) __builtin_expect(!!(exp), 1)
|
#define EXPECTED(exp) __builtin_expect(!!(exp), 1)
|
||||||
#define RESTRICT __restrict__
|
#define RESTRICT __restrict__
|
||||||
#define SETJMP_GNUC_PROTECT() (void)__builtin_return_address(1)
|
#define SETJMP_GNUC_PROTECT() (void)__builtin_return_address(1)
|
||||||
#ifndef TYPES_COMPATIBLE
|
|
||||||
#define TYPES_COMPATIBLE(a,b) __builtin_types_compatible_p(typeof(a), b)
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define ATTR_UNUSED
|
#define ATTR_UNUSED
|
||||||
#define ATTR_NORETURN
|
#define ATTR_NORETURN
|
||||||
@ -98,9 +85,6 @@
|
|||||||
#define EXPECTED(exp) (exp)
|
#define EXPECTED(exp) (exp)
|
||||||
#define RESTRICT
|
#define RESTRICT
|
||||||
#define SETJMP_GNUC_PROTECT() do {} while (0)
|
#define SETJMP_GNUC_PROTECT() do {} while (0)
|
||||||
#ifndef TYPES_COMPATIBLE
|
|
||||||
#define TYPES_COMPATIBLE(a,b) 1
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user