From 2700c776f033968a0ce139db4fdb307e9d993225 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 May 2018 20:42:17 +0800 Subject: =?UTF-8?q?=E5=B7=A5=E5=8E=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/graphics/luaopen_graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua/graphics/luaopen_graphics.cpp') diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 0d06aca..7db43c5 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -84,7 +84,7 @@ namespace lua { Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_JSL, sizeof(Proxy)); const char* program = luax_checkstring(L, 1); - JSLProgram* jsl = new JSLProgram(program); + JSLProgram* jsl = JSLProgram::createJSLProgram(program); proxy->bind(jsl); return 1; } @@ -98,7 +98,7 @@ namespace lua int w = luax_checknumber(L, 1); int h = luax_checknumber(L, 2); Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_CANVAS, sizeof(Proxy)); - Canvas* cvs = new Canvas(w, h); + Canvas* cvs = Canvas::createCanvas(w, h); proxy->bind(cvs); return 1; } -- cgit v1.1-26-g67d0