summaryrefslogtreecommitdiff
path: root/src/lua5
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua5')
-rw-r--r--src/lua5/cdlua5_active.c10
-rw-r--r--src/lua5/cdlua5_canvas.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/src/lua5/cdlua5_active.c b/src/lua5/cdlua5_active.c
index ad4398e..ca0f901 100644
--- a/src/lua5/cdlua5_active.c
+++ b/src/lua5/cdlua5_active.c
@@ -479,7 +479,7 @@ static int cdlua5_getclippoly(lua_State *L)
{
lua_pushnumber(L, n);
- lua_newtable(L);
+ lua_createtable(L, 2*n, 0);
for (i=0; i < 2*n; i++)
{
lua_pushnumber(L, i+1);
@@ -509,7 +509,7 @@ static int wdlua5_getclippoly(lua_State *L)
{
lua_pushnumber(L, n);
- lua_newtable(L);
+ lua_createtable(L, 2*n, 0);
for (i=0; i < 2*n; i++)
{
lua_pushnumber(L, i+1);
@@ -1390,7 +1390,7 @@ static int cdlua5_vectortexttransform(lua_State *L)
}
old_matrix = cdVectorTextTransform(matrix);
- lua_newtable(L);
+ lua_createtable(L, 6, 0);
for (i=0; i < 6; i++)
{
lua_pushnumber(L, old_matrix[i]);
@@ -1489,7 +1489,7 @@ static int cdlua5_vectortextbounds(lua_State *L)
int rect[8], i;
cdGetVectorTextBounds(s, x, y, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);
@@ -1510,7 +1510,7 @@ static int wdlua5_vectortextbounds(lua_State *L)
int i;
wdGetVectorTextBounds(s, x, y, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index c2f6008..0ea9b1b 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -398,7 +398,7 @@ static int cdlua5_gettransform(lua_State *L)
{
int i;
double* matrix = cdCanvasGetTransform(cdlua_checkcanvas(L, 1));
- lua_newtable(L);
+ lua_createtable(L, 6, 0);
for (i=0; i < 6; i++)
{
lua_pushnumber(L, matrix[i]);
@@ -1505,7 +1505,7 @@ static int cdlua5_gettextbounds(lua_State *L)
int i;
cdCanvasGetTextBounds(cdlua_checkcanvas(L, 1), x, y, s, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);
@@ -1526,7 +1526,7 @@ static int wdlua5_gettextbounds(lua_State *L)
int i;
wdCanvasGetTextBounds(cdlua_checkcanvas(L, 1), x, y, s, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);
@@ -1631,7 +1631,7 @@ static int cdlua5_vectortexttransform(lua_State *L)
}
old_matrix = cdCanvasVectorTextTransform(cdlua_checkcanvas(L, 1), matrix);
- lua_newtable(L);
+ lua_createtable(L, 6, 0);
for (i=0; i < 6; i++)
{
lua_pushnumber(L, old_matrix[i]);
@@ -1746,7 +1746,7 @@ static int cdlua5_getvectortextbounds(lua_State *L)
int rect[8], i;
cdCanvasGetVectorTextBounds(cdlua_checkcanvas(L, 1), s, x, y, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);
@@ -1767,7 +1767,7 @@ static int wdlua5_getvectortextbounds(lua_State *L)
int i;
wdCanvasGetVectorTextBounds(cdlua_checkcanvas(L, 1), s, x, y, rect);
- lua_newtable(L);
+ lua_createtable(L, 8, 0);
for (i=0; i < 8; i++)
{
lua_pushnumber(L, rect[i]);