mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Update sqconfig.h
This commit is contained in:
parent
07d215c428
commit
66599b5df3
51
vendor/Squirrel/include/sqconfig.h
vendored
51
vendor/Squirrel/include/sqconfig.h
vendored
@ -1,23 +1,26 @@
|
|||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#else
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _SQ64
|
#ifdef _SQ64
|
||||||
|
typedef int64_t SQInteger;
|
||||||
|
typedef uint64_t SQUnsignedInteger;
|
||||||
|
typedef size_t SQHash; /*should be the same size of a pointer*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
typedef int32_t SQInt32;
|
||||||
typedef __int64 SQInteger;
|
typedef uint32_t SQUnsignedInteger32;
|
||||||
typedef unsigned __int64 SQUnsignedInteger;
|
|
||||||
typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
|
|
||||||
#else
|
#else
|
||||||
typedef long long SQInteger;
|
typedef int32_t SQInteger;
|
||||||
typedef unsigned long long SQUnsignedInteger;
|
typedef uint32_t SQUnsignedInteger;
|
||||||
typedef unsigned long long SQHash; /*should be the same size of a pointer*/
|
typedef size_t SQHash; /*should be the same size of a pointer*/
|
||||||
#endif
|
|
||||||
typedef int SQInt32;
|
typedef int32_t SQInt32; /*must be 32 bits(also on 64bits processors)*/
|
||||||
typedef unsigned int SQUnsignedInteger32;
|
typedef uint32_t SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/
|
||||||
#else
|
|
||||||
typedef int SQInteger;
|
|
||||||
typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
|
|
||||||
typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/
|
|
||||||
typedef unsigned int SQUnsignedInteger;
|
|
||||||
typedef unsigned int SQHash; /*should be the same size of a pointer*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -28,11 +31,7 @@ typedef float SQFloat;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64)
|
#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64)
|
||||||
#ifdef _MSC_VER
|
typedef int64_t SQRawObjectVal; //must be 64bits
|
||||||
typedef __int64 SQRawObjectVal; //must be 64bits
|
|
||||||
#else
|
|
||||||
typedef long long SQRawObjectVal; //must be 64bits
|
|
||||||
#endif
|
|
||||||
#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
|
#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
|
||||||
#else
|
#else
|
||||||
typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise
|
typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise
|
||||||
@ -60,18 +59,22 @@ typedef wchar_t SQChar;
|
|||||||
|
|
||||||
|
|
||||||
#define scstrcmp wcscmp
|
#define scstrcmp wcscmp
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define scsprintf _snwprintf
|
#define scsprintf _snwprintf
|
||||||
#else
|
#else
|
||||||
#define scsprintf swprintf
|
#define scsprintf swprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define scstrlen wcslen
|
#define scstrlen wcslen
|
||||||
#define scstrtod wcstod
|
#define scstrtod wcstod
|
||||||
|
|
||||||
#ifdef _SQ64
|
#ifdef _SQ64
|
||||||
#define scstrtol wcstoll
|
#define scstrtol wcstoll
|
||||||
#else
|
#else
|
||||||
#define scstrtol wcstol
|
#define scstrtol wcstol
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define scstrtoul wcstoul
|
#define scstrtoul wcstoul
|
||||||
#define scvsprintf vswprintf
|
#define scvsprintf vswprintf
|
||||||
#define scstrstr wcsstr
|
#define scstrstr wcsstr
|
||||||
@ -89,7 +92,6 @@ typedef wchar_t SQChar;
|
|||||||
|
|
||||||
#define _SC(a) L##a
|
#define _SC(a) L##a
|
||||||
|
|
||||||
|
|
||||||
#define scisspace iswspace
|
#define scisspace iswspace
|
||||||
#define scisdigit iswdigit
|
#define scisdigit iswdigit
|
||||||
#define scisprint iswprint
|
#define scisprint iswprint
|
||||||
@ -98,20 +100,22 @@ typedef wchar_t SQChar;
|
|||||||
#define sciscntrl iswcntrl
|
#define sciscntrl iswcntrl
|
||||||
#define scisalnum iswalnum
|
#define scisalnum iswalnum
|
||||||
|
|
||||||
|
|
||||||
#define sq_rsl(l) ((l)<<WCHAR_SHIFT_MUL)
|
#define sq_rsl(l) ((l)<<WCHAR_SHIFT_MUL)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
typedef char SQChar;
|
typedef char SQChar;
|
||||||
#define _SC(a) a
|
#define _SC(a) a
|
||||||
#define scstrcmp strcmp
|
#define scstrcmp strcmp
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define scsprintf _snprintf
|
#define scsprintf _snprintf
|
||||||
#else
|
#else
|
||||||
#define scsprintf snprintf
|
#define scsprintf snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define scstrlen strlen
|
#define scstrlen strlen
|
||||||
#define scstrtod strtod
|
#define scstrtod strtod
|
||||||
|
|
||||||
#ifdef _SQ64
|
#ifdef _SQ64
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define scstrtol _strtoi64
|
#define scstrtol _strtoi64
|
||||||
@ -121,6 +125,7 @@ typedef char SQChar;
|
|||||||
#else
|
#else
|
||||||
#define scstrtol strtol
|
#define scstrtol strtol
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define scstrtoul strtoul
|
#define scstrtoul strtoul
|
||||||
#define scvsprintf vsnprintf
|
#define scvsprintf vsnprintf
|
||||||
#define scstrstr strstr
|
#define scstrstr strstr
|
||||||
|
Loading…
Reference in New Issue
Block a user