Changeset 86 for trunk/tests


Ignore:
Timestamp:
06/02/13 18:38:01 (12 years ago)
Author:
epyon
Message:
  • lua::state constructors made explicit
  • lua::state can implicitly cast to lua_State*
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/lualib_test/lualib_test.cc

    r79 r86  
    2828        {
    2929                nv::lua::state state( true );
    30                 nlua_register_glm( state.get_raw() );
     30                nlua_register_glm( state );
    3131                // run the Lua script
    3232                state.do_file( "init.lua" );
     
    3434                for (;;)
    3535                {
    36                         nv::lua::stack_guard guard( &state );
     36                        nv::lua::stack_guard guard( state );
    3737                        int stack = guard.get_level();
    3838                        std::string input;
     
    5656                        if ( !result )
    5757                        {
    58                                 std::string error = lua_tostring( state.get_raw(), -1 );
     58                                std::string error = lua_tostring( state, -1 );
    5959                                std::cout << "ERROR : " << error << std::endl;
    6060                                continue;
    6161                        }
    6262
    63                         if (lua_gettop( state.get_raw() ) > stack)
     63                        if (lua_gettop( state ) > stack)
    6464                        {
    65                                 for ( int i = stack+1; i <= lua_gettop( state.get_raw() ); ++i )
     65                                for ( int i = stack+1; i <= lua_gettop( state ); ++i )
    6666                                {
    67                                         std::cout << nlua_typecontent( state.get_raw(), i ) << std::endl;
     67                                        std::cout << nlua_typecontent( state, i ) << std::endl;
    6868                                }
    6969                        }
Note: See TracChangeset for help on using the changeset viewer.