Example #1
0
int
Port::LuaGetType(lua_State *L)
{
    ShaderObject *obj = *(ShaderObject **)lua_touserdata(L, lua_upvalueindex(1));
    Port *port = dynamic_cast<Port *>(obj);
    wxString type = port->GetType();

    std::string temp;
    Helium::ConvertString( (const wxChar*)type.c_str(), temp );
    lua_pushlstring(L, temp.c_str(), temp.length());
    return 1;
}