diff options
Diffstat (limited to '3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h')
-rw-r--r-- | 3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h b/3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h index fa26cfa..d1801cb 100644 --- a/3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h +++ b/3rdparty/lua/src/modules/lua-winreg/src/lua_int64.h @@ -1,47 +1,47 @@ -#ifndef __LUA_INT64_H___
-#define __LUA_INT64_H___
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <windows.h>
-#include <stdlib.h> //lua_push?INT64
-#include <lua.h>
-#include <lualib.h>
-#include <lauxlib.h>
-
-UINT64 lua_checkUINT64(lua_State *L, int i);
-INT64 lua_checkINT64(lua_State *L, int i);
-int atoUINT64(const char* s, UINT64 * pv);
-int atoINT64(const char* s, INT64 *pv);
-
-#ifdef __GNUC__
- #define CONST_9007199254740992 0x20000000000000LL
-#else
- #define CONST_9007199254740992 9007199254740992
-#endif
-
-#define lua_pushUINT64(L,n) \
- if( n > CONST_9007199254740992 ){ \
- char buf[24]; \
- if(_ui64toa_s(n, buf, _countof(buf), 10)){ \
- lua_pushnil(L);return; \
- }else{ \
- lua_pushstring(L, buf); \
- } \
- }else{ \
- lua_pushnumber(L, (lua_Number)(__int64)n); \
- }
-
-#define lua_pushINT64(L,n) \
- if(n > 9007199254740992 || n < -9007199254740992){ \
- char buf[24]; \
- lua_pushstring(L, _i64toa(n, buf, 10)); \
- }else{ \
- lua_pushnumber(L, (lua_Number)n); \
- }
-
-#ifdef __cplusplus
-}
-#endif
+#ifndef __LUA_INT64_H___ +#define __LUA_INT64_H___ +#ifdef __cplusplus +extern "C" { +#endif + +#include <windows.h> +#include <stdlib.h> //lua_push?INT64 +#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> + +UINT64 lua_checkUINT64(lua_State *L, int i); +INT64 lua_checkINT64(lua_State *L, int i); +int atoUINT64(const char* s, UINT64 * pv); +int atoINT64(const char* s, INT64 *pv); + +#ifdef __GNUC__ + #define CONST_9007199254740992 0x20000000000000LL +#else + #define CONST_9007199254740992 9007199254740992 +#endif + +#define lua_pushUINT64(L,n) \ + if( n > CONST_9007199254740992 ){ \ + char buf[24]; \ + if(_ui64toa_s(n, buf, _countof(buf), 10)){ \ + lua_pushnil(L);return; \ + }else{ \ + lua_pushstring(L, buf); \ + } \ + }else{ \ + lua_pushnumber(L, (lua_Number)(__int64)n); \ + } + +#define lua_pushINT64(L,n) \ + if(n > 9007199254740992 || n < -9007199254740992){ \ + char buf[24]; \ + lua_pushstring(L, _i64toa(n, buf, 10)); \ + }else{ \ + lua_pushnumber(L, (lua_Number)n); \ + } + +#ifdef __cplusplus +} +#endif #endif //__LUA_INT64_H___
\ No newline at end of file |