소스 검색

lua: disable 64-bit integer setters.

Lua only supports the "double" type for now, so storing a 64-bit integer
would lose information unless it's encapsulated in a more complex type.
I prefer to disable these accessors for now.
undefined
Sam Hocevar 9 년 전
부모
커밋
98ad45046f
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. +9
    -0
      src/lolua/baselua.h

+ 9
- 0
src/lolua/baselua.h 파일 보기

@@ -511,6 +511,8 @@ template<> inline int Var<float>::InnerPush(LuaState* l)
Var<double> v = (double)m_value;
return v.Return(l);
}

#if 0
//-----------------------------------------------------------------------------
template<> inline bool Var<int64_t>::InnerIsValid(LuaState* l, int index)
{
@@ -525,6 +527,8 @@ template<> inline int Var<int64_t>::InnerPush(LuaState* l)
lua_pushinteger(l, m_value);
return 1;
}
#endif

//-----------------------------------------------------------------------------
template<> inline bool Var<int32_t>::InnerIsValid(LuaState* l, int index)
{
@@ -541,6 +545,7 @@ template<> inline int Var<int32_t>::InnerPush(LuaState* l)
Var<int64_t> v = (int64_t)m_value;
return v.Return(l);
}

//-----------------------------------------------------------------------------
template<> inline bool Var<uint32_t>::InnerIsValid(LuaState* l, int index)
{
@@ -555,6 +560,8 @@ template<> inline int Var<uint32_t>::InnerPush(LuaState* l)
lua_pushunsigned(l, m_value);
return 1;
}

#if 0
//-----------------------------------------------------------------------------
template<> inline bool Var<uint64_t>::InnerIsValid(LuaState* l, int index)
{
@@ -571,6 +578,8 @@ template<> inline int Var<uint64_t>::InnerPush(LuaState* l)
Var<uint32_t> v = (uint32_t)m_value;
return v.Return(l);
}
#endif

//-----------------------------------------------------------------------------
template<> inline bool Var<vec2>::InnerIsValid(LuaState* l, int index)
{


불러오는 중...
취소
저장