Example #1
0
/* method: getDataRootDirectory of class  Global */
static int tolua_LuaAPI_Global_getDataRootDirectory00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
 !tolua_isusertype(tolua_S,1,"Global",0,&tolua_err) || 
 !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
 goto tolua_lerror;
 else
#endif
 {
  Global* self = (Global*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
 if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getDataRootDirectory'",NULL);
#endif
 {
  tstring tolua_ret =  self->getDataRootDirectory();
 {
#ifdef __cplusplus
 void* tolua_obj = new tstring(tolua_ret);
 tolua_pushusertype(tolua_S,tolua_clone(tolua_S,tolua_obj,tolua_collect_tstring),"tstring");
#else
 void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(tstring));
 tolua_pushusertype(tolua_S,tolua_clone(tolua_S,tolua_obj,NULL),"tstring");
#endif
 }
 }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'getDataRootDirectory'.",&tolua_err);
 return 0;
#endif
}