CheckType -> CheckLuaObjectType
This commit is contained in:
@@ -19,7 +19,7 @@ void CreateMethodsTable( lua_State *L, const CString &szName )
|
|||||||
* Get a userdata, and check that it's either szType or a type
|
* Get a userdata, and check that it's either szType or a type
|
||||||
* derived from szType, by walking the __index chain.
|
* derived from szType, by walking the __index chain.
|
||||||
*/
|
*/
|
||||||
bool CheckType( lua_State *L, int narg, const char *szType )
|
bool CheckLuaObjectType( lua_State *L, int narg, const char *szType )
|
||||||
{
|
{
|
||||||
int iTop = lua_gettop(L);
|
int iTop = lua_gettop(L);
|
||||||
lua_pushvalue( L, narg );
|
lua_pushvalue( L, narg );
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "LuaManager.h"
|
#include "LuaManager.h"
|
||||||
|
|
||||||
void CreateMethodsTable( lua_State *L, const CString &szName );
|
void CreateMethodsTable( lua_State *L, const CString &szName );
|
||||||
bool CheckType( lua_State *L, int narg, const char *szType );
|
bool CheckLuaObjectType( lua_State *L, int narg, const char *szType );
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
class Luna
|
class Luna
|
||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
// get userdata from Lua stack and return pointer to T object
|
// get userdata from Lua stack and return pointer to T object
|
||||||
static T *check( lua_State *L, int narg, bool bIsSelf = false )
|
static T *check( lua_State *L, int narg, bool bIsSelf = false )
|
||||||
{
|
{
|
||||||
if( !CheckType(L, narg, m_sClassName) )
|
if( !CheckLuaObjectType(L, narg, m_sClassName) )
|
||||||
{
|
{
|
||||||
if( bIsSelf )
|
if( bIsSelf )
|
||||||
luaL_typerror( L, narg, m_sClassName );
|
luaL_typerror( L, narg, m_sClassName );
|
||||||
|
|||||||
Reference in New Issue
Block a user