mirror of https://github.com/odrling/Aegisub
Fix compilation on platforms where int64_t == long
This commit is contained in:
parent
13521a0c3e
commit
bbd8bb0eab
|
@ -57,6 +57,7 @@
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -21,17 +21,19 @@
|
||||||
#include <libaegisub/fs.h>
|
#include <libaegisub/fs.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <type_traits>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
|
||||||
inline void push_value(lua_State *L, bool value) { lua_pushboolean(L, value); }
|
inline void push_value(lua_State *L, bool value) { lua_pushboolean(L, value); }
|
||||||
inline void push_value(lua_State *L, const char *value) { lua_pushstring(L, value); }
|
inline void push_value(lua_State *L, const char *value) { lua_pushstring(L, value); }
|
||||||
inline void push_value(lua_State *L, double value) { lua_pushnumber(L, value); }
|
inline void push_value(lua_State *L, double value) { lua_pushnumber(L, value); }
|
||||||
inline void push_value(lua_State *L, int value) { lua_pushinteger(L, value); }
|
inline void push_value(lua_State *L, int value) { lua_pushinteger(L, value); }
|
||||||
inline void push_value(lua_State *L, size_t value) { lua_pushinteger(L, value); }
|
|
||||||
inline void push_value(lua_State *L, int64_t value) { lua_pushinteger(L, value); }
|
|
||||||
inline void push_value(lua_State *L, long value) { lua_pushinteger(L, value); }
|
|
||||||
inline void push_value(lua_State *L, void *p) { lua_pushlightuserdata(L, p); }
|
inline void push_value(lua_State *L, void *p) { lua_pushlightuserdata(L, p); }
|
||||||
|
|
||||||
|
template<typename Integer>
|
||||||
|
typename std::enable_if<std::is_integral<Integer>::value>::type
|
||||||
|
push_value(lua_State *L, Integer value) { lua_pushinteger(L, value); }
|
||||||
|
|
||||||
inline void push_value(lua_State *L, wxString const& value) {
|
inline void push_value(lua_State *L, wxString const& value) {
|
||||||
lua_pushstring(L, value.utf8_str());
|
lua_pushstring(L, value.utf8_str());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue