Applied namespace renaming and formatting to Lua.
%module tinysplinelua
-// std::vector<ts::rational> to lua table
-%typemap(out) std::vector<ts::rational> * {
+// Map std::vector<tinyspline::rational> to Lua table.
+%typemap(out) std::vector<tinyspline::rational> * {
const int size = $1->size();
lua_createtable(L, size, 0);
for (int i = 0; i < size; i++) {
return 1;
}
-// lua table to std::vector<ts::rational>
-%typemap(in) std::vector<ts::rational> * (int idx) %{
- $1 = new std::vector<ts::rational>();
+// Map Lua table to std::vector<tinyspline::rational>.
+%typemap(in) std::vector<tinyspline::rational> * (int idx) %{
+ $1 = new std::vector<tinyspline::rational>();
idx = lua_gettop(L);
lua_pushnil(L);
while (lua_next(L, idx)) {
}
%}
-// cleanup memory allocated by typemaps
-%typemap(freearg) std::vector<ts::rational> * {
+// Cleanup memory allocated by typemaps.
+%typemap(freearg) std::vector<tinyspline::rational> * {
delete $1;
}
//* BSpline (Lua) *
//* *
//********************************************************
-%ignore ts::BSpline::operator=;
+%ignore tinyspline::BSpline::operator=;
//********************************************************
//* *
//* DeBoorNet (Lua) *
//* *
//********************************************************
-%ignore ts::DeBoorNet::operator=;
+%ignore tinyspline::DeBoorNet::operator=;
//********************************************************
//* *
