mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4152 from samuele3hu/developCheck
Add conversion functions to support bindings-generator
This commit is contained in:
commit
9ed0bd0689
|
@ -283,6 +283,30 @@ bool luaval_to_point(lua_State* L,int lo,Point* outValue)
|
|||
return ok;
|
||||
}
|
||||
|
||||
bool luaval_to_long(lua_State* L,int lo, long* outValue)
|
||||
{
|
||||
if (NULL == L || NULL == outValue)
|
||||
return false;
|
||||
|
||||
bool ok = true;
|
||||
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isnumber(L,lo,0,&tolua_err))
|
||||
{
|
||||
#if COCOS2D_DEBUG >=1
|
||||
luaval_to_native_err(L,"#ferror:",&tolua_err);
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
*outValue = (long)tolua_tonumber(L, lo, 0);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool luaval_to_size(lua_State* L,int lo,Size* outValue)
|
||||
{
|
||||
if (NULL == L || NULL == outValue)
|
||||
|
|
|
@ -30,6 +30,7 @@ extern bool luaval_to_boolean(lua_State* L,int lo,bool* outValue);
|
|||
extern bool luaval_to_number(lua_State* L,int lo,double* outValue);
|
||||
extern bool luaval_to_long_long(lua_State* L,int lo,long long* outValue);
|
||||
extern bool luaval_to_std_string(lua_State* L, int lo, std::string* outValue);
|
||||
extern bool luaval_to_long(lua_State* L,int lo, long* outValue);
|
||||
|
||||
extern bool luaval_to_point(lua_State* L,int lo,Point* outValue);
|
||||
extern bool luaval_to_size(lua_State* L,int lo,Size* outValue);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d41959ab0b15c20aa0802ab5c9ef92be7b742bd4
|
||||
Subproject commit 7ccbabbaa677607048c511b33cb6d83b2081220e
|
Loading…
Reference in New Issue