summaryrefslogtreecommitdiff
path: root/lib/luacd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/luacd.cpp')
-rw-r--r--lib/luacd.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/luacd.cpp b/lib/luacd.cpp
index 0d8b865..b1d43a0 100644
--- a/lib/luacd.cpp
+++ b/lib/luacd.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: luacd.cpp,v 1.8 2003-12-14 22:04:34 pixel Exp $ */
+/* $Id: luacd.cpp,v 1.9 2004-01-03 15:04:47 pixel Exp $ */
#include "luacd.h"
@@ -1038,7 +1038,7 @@ int sLua_PVD::PVD_proceed_statics(Lua * L, int n, int caller) {
case PVD_NEWPVD:
r = 1;
{
- LuaPVD pvd(new PVD);
+ LuaPVD pvd((PVD *) malloc(sizeof(PVD)));
pvd.pushdestruct(L);
}
break;
@@ -1356,7 +1356,7 @@ struct lua_functypes_t isobuilder_methods[] = {
{ ISOBUILDER_CREATEDIR, "createdir", 2, 5, {LUA_OBJECT, LUA_STRING, LUA_NUMBER, LUA_OBJECT, LUA_NUMBER} },
{ ISOBUILDER_CREATEFILE, "createfile", 3, 5, {LUA_OBJECT, LUA_STRING, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} },
{ ISOBUILDER_COPYDIR, "copydir", 3, 4, {LUA_OBJECT, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} },
- { ISOBUILDER_CLOSE, "close", 0, 2, {LUA_OBJECT, LUA_NUMBER} },
+ { ISOBUILDER_CLOSE, "close", 0, 3, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER} },
{ -1, 0, 0, 0, 0 }
};
@@ -1427,7 +1427,7 @@ void Luaisobuilder::pushstatics(Lua * L) throw (GeneralException) {
int sLua_isobuilder::isobuilder_proceed(Lua * L, int n, isobuilder * iso, int caller) {
int r = 0, i;
Handle * h = 0;
- int mode = -1, sector = -1, rootsize = 1, ptsize = 1, nvd = 1, rootsect = -1;
+ int mode = -1, sector = -1, rootsize = 1, ptsize = 1, nvd = 1, rootsect = -1, nsects = -1;
size_t size;
Byte datas[2352 * 16], * p;
PVD * pvd;
@@ -1573,7 +1573,9 @@ int sLua_isobuilder::isobuilder_proceed(Lua * L, int n, isobuilder * iso, int ca
h = (Handle *) LuaObject::getme(L, 2);
if (n >= 2)
mode = L->tonumber(3);
- iso->close(h, mode);
+ if (n >= 3)
+ nsects = L->tonumber(4);
+ iso->close(h, mode, nsects);
break;
}
@@ -1601,7 +1603,8 @@ int sLua_isobuilder::isobuilder_proceed_statics(Lua * L, int n, int caller) {
break;
case ISOBUILDER_CREATEPVD_HANDLE:
h = (Handle *) LuaObject::getme(L, 1);
- pvd = new PVD(isobuilder::createpvd(h));
+ pvd = (PVD *) malloc(sizeof(PVD));
+ *pvd = isobuilder::createpvd(h);
{
LuaPVD t(pvd);
t.pushdestruct(L);
@@ -1610,7 +1613,8 @@ int sLua_isobuilder::isobuilder_proceed_statics(Lua * L, int n, int caller) {
break;
case ISOBUILDER_CREATEPVD:
cd = (cdutils *) LuaObject::getme(L, 1);
- pvd = new PVD(isobuilder::createpvd(cd));
+ pvd = (PVD *) malloc(sizeof(PVD));
+ *pvd = isobuilder::createpvd(cd);
{
LuaPVD t(pvd);
t.pushdestruct(L);
@@ -1624,7 +1628,8 @@ int sLua_isobuilder::isobuilder_proceed_statics(Lua * L, int n, int caller) {
datas[i] = L->tonumber();
L->pop();
}
- pvd = new PVD(isobuilder::createpvd(datas));
+ pvd = (PVD *) malloc(sizeof(PVD));
+ *pvd = isobuilder::createpvd(datas);
{
LuaPVD t(pvd);
t.pushdestruct(L);