Changeset 79 for trunk/src/lua


Ignore:
Timestamp:
06/02/13 00:53:25 (12 years ago)
Author:
epyon
Message:
  • lua::state::do_string can take a returns parameter
  • lua::state::load_* functions made private (for now?)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua_state.cc

    r78 r79  
    7676}
    7777
    78 bool lua::state::do_string( const std::string& code, const std::string& name )
     78bool lua::state::do_string( const std::string& code, const std::string& name, int rvalues )
    7979{
    8080        lua::stack_guard( this );
     
    8585                return false;
    8686        }
    87         return do_current( name ) == 0;
     87        return do_current( name, rvalues ) == 0;
    8888}
    8989
     
    112112}
    113113
    114 int lua::state::do_current( const std::string& name )
    115 {
    116         int result = lua_pcall(L, 0, 0, 0);
     114int lua::state::do_current( const std::string& name, int rvalues )
     115{
     116        int result = lua_pcall(L, 0, rvalues, 0);
    117117        if (result)
    118118        {
Note: See TracChangeset for help on using the changeset viewer.