Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-06-05 03:02:50 -03:00
68 changed files with 1439 additions and 524 deletions
+5 -17
View File
@@ -232,22 +232,10 @@ int w_Shader_sendMatrix(lua_State *L)
lua_pop(L, 1 + dimension);
}
bool should_error = false;
try
{
shader->sendMatrix(name, dimension, values, count);
}
catch(love::Exception &e)
{
should_error = true;
lua_pushstring(L, e.what());
}
delete[] values;
if (should_error)
return luaL_error(L, "%s", lua_tostring(L, -1));
luax_catchexcept(L,
[&]() { shader->sendMatrix(name, dimension, values, count); },
[&]() { delete[] values; }
);
return 0;
}
@@ -258,7 +246,7 @@ int w_Shader_sendTexture(lua_State *L)
const char *name = luaL_checkstring(L, 2);
Texture *texture = luax_checktexture(L, 3);
EXCEPT_GUARD(shader->sendTexture(name, texture);)
luax_catchexcept(L, [&](){ shader->sendTexture(name, texture); });
return 0;
}