From 7dd960619d8c39817480f8fe2ce64a8eec719908 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sun, 13 Nov 2016 17:13:40 +0100 Subject: [PATCH] Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype --HG-- branch : dynamiccore2 --- src/common/runtime.h | 24 ++++++++++++++++++- src/common/wrap_Data.cpp | 2 +- src/modules/audio/wrap_Audio.cpp | 4 ++-- src/modules/audio/wrap_Source.cpp | 4 ++-- src/modules/filesystem/wrap_DroppedFile.cpp | 2 +- src/modules/filesystem/wrap_File.cpp | 6 ++--- src/modules/filesystem/wrap_FileData.cpp | 2 +- src/modules/filesystem/wrap_Filesystem.cpp | 4 ++-- src/modules/font/wrap_Font.cpp | 6 ++--- src/modules/font/wrap_GlyphData.cpp | 2 +- src/modules/font/wrap_Rasterizer.cpp | 2 +- src/modules/graphics/opengl/wrap_Canvas.cpp | 4 ++-- src/modules/graphics/opengl/wrap_Font.cpp | 2 +- src/modules/graphics/opengl/wrap_Graphics.cpp | 20 ++++++++-------- src/modules/graphics/opengl/wrap_Image.cpp | 2 +- src/modules/graphics/opengl/wrap_Mesh.cpp | 4 ++-- .../graphics/opengl/wrap_ParticleSystem.cpp | 6 ++--- src/modules/graphics/opengl/wrap_Shader.cpp | 2 +- .../graphics/opengl/wrap_SpriteBatch.cpp | 6 ++--- src/modules/graphics/opengl/wrap_Text.cpp | 4 ++-- src/modules/graphics/opengl/wrap_Video.cpp | 4 ++-- src/modules/graphics/wrap_Quad.cpp | 2 +- src/modules/graphics/wrap_Texture.cpp | 2 +- .../image/wrap_CompressedImageData.cpp | 2 +- src/modules/image/wrap_ImageData.cpp | 2 +- src/modules/joystick/wrap_Joystick.cpp | 2 +- src/modules/math/wrap_BezierCurve.cpp | 2 +- src/modules/math/wrap_CompressedData.cpp | 2 +- src/modules/math/wrap_Math.cpp | 10 ++++---- src/modules/math/wrap_RandomGenerator.cpp | 2 +- src/modules/mouse/wrap_Cursor.cpp | 2 +- src/modules/mouse/wrap_Mouse.cpp | 2 +- src/modules/physics/box2d/Physics.cpp | 4 ++-- src/modules/physics/box2d/wrap_Body.cpp | 4 ++-- src/modules/physics/box2d/wrap_ChainShape.cpp | 2 +- .../physics/box2d/wrap_CircleShape.cpp | 2 +- src/modules/physics/box2d/wrap_Contact.cpp | 4 ++-- .../physics/box2d/wrap_DistanceJoint.cpp | 2 +- src/modules/physics/box2d/wrap_EdgeShape.cpp | 2 +- src/modules/physics/box2d/wrap_Fixture.cpp | 4 ++-- .../physics/box2d/wrap_FrictionJoint.cpp | 2 +- src/modules/physics/box2d/wrap_GearJoint.cpp | 2 +- src/modules/physics/box2d/wrap_Joint.cpp | 4 ++-- src/modules/physics/box2d/wrap_MotorJoint.cpp | 2 +- src/modules/physics/box2d/wrap_MouseJoint.cpp | 2 +- .../physics/box2d/wrap_PolygonShape.cpp | 2 +- .../physics/box2d/wrap_PrismaticJoint.cpp | 2 +- .../physics/box2d/wrap_PulleyJoint.cpp | 2 +- .../physics/box2d/wrap_RevoluteJoint.cpp | 2 +- src/modules/physics/box2d/wrap_RopeJoint.cpp | 2 +- src/modules/physics/box2d/wrap_Shape.cpp | 2 +- src/modules/physics/box2d/wrap_WeldJoint.cpp | 2 +- src/modules/physics/box2d/wrap_WheelJoint.cpp | 2 +- src/modules/physics/box2d/wrap_World.cpp | 4 ++-- src/modules/sound/wrap_Decoder.cpp | 2 +- src/modules/sound/wrap_SoundData.cpp | 2 +- src/modules/thread/wrap_Channel.cpp | 2 +- src/modules/thread/wrap_LuaThread.cpp | 2 +- src/modules/thread/wrap_ThreadModule.cpp | 4 ++-- src/modules/video/wrap_VideoStream.cpp | 6 ++--- src/modules/window/wrap_Window.cpp | 2 +- 61 files changed, 120 insertions(+), 98 deletions(-) diff --git a/src/common/runtime.h b/src/common/runtime.h index fcdda6b95..36e335221 100644 --- a/src/common/runtime.h +++ b/src/common/runtime.h @@ -458,6 +458,12 @@ T *luax_checktype(lua_State *L, int idx, love::Type &type) return (T *)u->object; } +template +T *luax_checktype(lua_State *L, int idx) +{ + return luax_checktype(L, idx, T::type); +} + template T *luax_getmodule(lua_State *L, love::Type &type) { @@ -480,6 +486,12 @@ T *luax_getmodule(lua_State *L, love::Type &type) return (T *)u->object; } +template +T *luax_getmodule(lua_State *L) +{ + return luax_getmodule(L, T::type); +} + template T *luax_optmodule(lua_State *L, love::Type &type) { @@ -505,6 +517,12 @@ T *luax_optmodule(lua_State *L, love::Type &type) return (T *) u->object; } +template +T *luax_optmodule(lua_State *L) +{ + return luax_optmodule(L, T::type); +} + /** * Converts the value at idx to the specified type without checking that * this conversion is valid. If the type has been previously verified with @@ -524,7 +542,11 @@ T *luax_totype(lua_State *L, int idx, love::Type& /*type*/) return o; } - +template +T *luax_totype(lua_State *L, int idx) +{ + return luax_totype(L, idx, T::type); +} uint32 luax_type(lua_State *L, int idx); diff --git a/src/common/wrap_Data.cpp b/src/common/wrap_Data.cpp index 43e4b92fc..fb4edd8aa 100644 --- a/src/common/wrap_Data.cpp +++ b/src/common/wrap_Data.cpp @@ -25,7 +25,7 @@ namespace love Data *luax_checkdata(lua_State *L, int idx) { - return luax_checktype(L, idx, Data::type); + return luax_checktype(L, idx); } int w_Data_getString(lua_State *L) diff --git a/src/modules/audio/wrap_Audio.cpp b/src/modules/audio/wrap_Audio.cpp index 0389b3fd4..5079d399b 100644 --- a/src/modules/audio/wrap_Audio.cpp +++ b/src/modules/audio/wrap_Audio.cpp @@ -63,9 +63,9 @@ int w_newSource(lua_State *L) luax_catchexcept(L, [&]() { if (luax_istype(L, 1, love::sound::SoundData::type)) - t = instance()->newSource(luax_totype(L, 1, love::sound::SoundData::type)); + t = instance()->newSource(luax_totype(L, 1)); else if (luax_istype(L, 1, love::sound::Decoder::type)) - t = instance()->newSource(luax_totype(L, 1, love::sound::Decoder::type)); + t = instance()->newSource(luax_totype(L, 1)); }); if (t != nullptr) diff --git a/src/modules/audio/wrap_Source.cpp b/src/modules/audio/wrap_Source.cpp index 73c95836e..2328f58a3 100644 --- a/src/modules/audio/wrap_Source.cpp +++ b/src/modules/audio/wrap_Source.cpp @@ -30,7 +30,7 @@ namespace audio Source *luax_checksource(lua_State *L, int idx) { - return luax_checktype(L, idx, love::audio::Source::type); + return luax_checktype(L, idx); } int w_Source_clone(lua_State *L) @@ -344,7 +344,7 @@ int w_Source_queue(lua_State *L) if (luax_istype(L, 2, love::sound::SoundData::type)) { - auto s = luax_totype(L, 2, love::sound::SoundData::type); + auto s = luax_totype(L, 2); int offset = 0; size_t length = s->getSize(); diff --git a/src/modules/filesystem/wrap_DroppedFile.cpp b/src/modules/filesystem/wrap_DroppedFile.cpp index f54e3661c..c8d09b99a 100644 --- a/src/modules/filesystem/wrap_DroppedFile.cpp +++ b/src/modules/filesystem/wrap_DroppedFile.cpp @@ -28,7 +28,7 @@ namespace filesystem DroppedFile *luax_checkdroppedfile(lua_State *L, int idx) { - return luax_checktype(L, idx, DroppedFile::type); + return luax_checktype(L, idx); } extern "C" int luaopen_droppedfile(lua_State *L) diff --git a/src/modules/filesystem/wrap_File.cpp b/src/modules/filesystem/wrap_File.cpp index eff5bef70..3c3da7cf6 100644 --- a/src/modules/filesystem/wrap_File.cpp +++ b/src/modules/filesystem/wrap_File.cpp @@ -43,7 +43,7 @@ int luax_ioError(lua_State *L, const char *fmt, ...) File *luax_checkfile(lua_State *L, int idx) { - return luax_checktype(L, idx, love::filesystem::File::type); + return luax_checktype(L, idx); } int w_File_getSize(lua_State *L) @@ -152,7 +152,7 @@ int w_File_write(lua_State *L) { try { - love::Data *data = luax_totype(L, 2, love::Data::type); + love::Data *data = luax_totype(L, 2); result = file->write(data, luaL_optinteger(L, 3, data->getSize())); } catch (love::Exception &e) @@ -227,7 +227,7 @@ int w_File_lines_i(lua_State *L) int linesize = 0; bool newline = false; - File *file = luax_checktype(L, lua_upvalueindex(1), File::type); + File *file = luax_checktype(L, lua_upvalueindex(1)); // Only accept read mode at this point. if (file->getMode() != File::MODE_READ) diff --git a/src/modules/filesystem/wrap_FileData.cpp b/src/modules/filesystem/wrap_FileData.cpp index 678b17f22..bd66d3b14 100644 --- a/src/modules/filesystem/wrap_FileData.cpp +++ b/src/modules/filesystem/wrap_FileData.cpp @@ -29,7 +29,7 @@ namespace filesystem FileData *luax_checkfiledata(lua_State *L, int idx) { - return luax_checktype(L, idx, FileData::type); + return luax_checktype(L, idx); } int w_FileData_getFilename(lua_State *L) diff --git a/src/modules/filesystem/wrap_Filesystem.cpp b/src/modules/filesystem/wrap_Filesystem.cpp index a724a8afc..a37404dd4 100644 --- a/src/modules/filesystem/wrap_Filesystem.cpp +++ b/src/modules/filesystem/wrap_Filesystem.cpp @@ -115,7 +115,7 @@ int w_mount(lua_State *L) if (luax_istype(L, 1, DroppedFile::type)) { - DroppedFile *file = luax_totype(L, 1, DroppedFile::type); + DroppedFile *file = luax_totype(L, 1); archive = file->getFilename(); } else @@ -400,7 +400,7 @@ static int w_write_or_append(lua_State *L, File::Mode mode) if (luax_istype(L, 2, love::Data::type)) { - love::Data *data = luax_totype(L, 2, love::Data::type); + love::Data *data = luax_totype(L, 2); input = (const char *) data->getData(); len = data->getSize(); } diff --git a/src/modules/font/wrap_Font.cpp b/src/modules/font/wrap_Font.cpp index ac6a3cde2..7a1d471dc 100644 --- a/src/modules/font/wrap_Font.cpp +++ b/src/modules/font/wrap_Font.cpp @@ -129,7 +129,7 @@ int w_newBMFontRasterizer(lua_State *L) lua_rawgeti(L, 2, i); convimagedata(L, -1); - image::ImageData *id = luax_checktype(L, -1, image::ImageData::type); + image::ImageData *id = luax_checktype(L, -1); images.push_back(id); id->retain(); @@ -141,7 +141,7 @@ int w_newBMFontRasterizer(lua_State *L) for (int i = 2; i <= lua_gettop(L); i++) { convimagedata(L, i); - image::ImageData *id = luax_checktype(L, i, image::ImageData::type); + image::ImageData *id = luax_checktype(L, i); images.push_back(id); id->retain(); } @@ -163,7 +163,7 @@ int w_newImageRasterizer(lua_State *L) convimagedata(L, 1); - image::ImageData *d = luax_checktype(L, 1, image::ImageData::type); + image::ImageData *d = luax_checktype(L, 1); std::string glyphs = luax_checkstring(L, 2); int extraspacing = (int) luaL_optnumber(L, 3, 0); diff --git a/src/modules/font/wrap_GlyphData.cpp b/src/modules/font/wrap_GlyphData.cpp index a605562d6..1708cebeb 100644 --- a/src/modules/font/wrap_GlyphData.cpp +++ b/src/modules/font/wrap_GlyphData.cpp @@ -27,7 +27,7 @@ namespace font GlyphData *luax_checkglyphdata(lua_State *L, int idx) { - return luax_checktype(L, idx, GlyphData::type); + return luax_checktype(L, idx); } int w_GlyphData_getWidth(lua_State *L) diff --git a/src/modules/font/wrap_Rasterizer.cpp b/src/modules/font/wrap_Rasterizer.cpp index 76047de6a..c090e0f8a 100644 --- a/src/modules/font/wrap_Rasterizer.cpp +++ b/src/modules/font/wrap_Rasterizer.cpp @@ -29,7 +29,7 @@ namespace font Rasterizer *luax_checkrasterizer(lua_State *L, int idx) { - return luax_checktype(L, idx, Rasterizer::type); + return luax_checktype(L, idx); } int w_Rasterizer_getHeight(lua_State *L) diff --git a/src/modules/graphics/opengl/wrap_Canvas.cpp b/src/modules/graphics/opengl/wrap_Canvas.cpp index 0b791079e..f7f4ad1a7 100644 --- a/src/modules/graphics/opengl/wrap_Canvas.cpp +++ b/src/modules/graphics/opengl/wrap_Canvas.cpp @@ -30,7 +30,7 @@ namespace opengl Canvas *luax_checkcanvas(lua_State *L, int idx) { - return luax_checktype(L, idx, Canvas::type); + return luax_checktype(L, idx); } int w_Canvas_renderTo(lua_State *L) @@ -68,7 +68,7 @@ int w_Canvas_renderTo(lua_State *L) int w_Canvas_newImageData(lua_State *L) { Canvas *canvas = luax_checkcanvas(L, 1); - love::image::Image *image = luax_getmodule(L, love::image::Image::type); + love::image::Image *image = luax_getmodule(L); int x = (int) luaL_optnumber(L, 2, 0); int y = (int) luaL_optnumber(L, 3, 0); int w = (int) luaL_optnumber(L, 4, canvas->getWidth()); diff --git a/src/modules/graphics/opengl/wrap_Font.cpp b/src/modules/graphics/opengl/wrap_Font.cpp index 0bf83569e..2baecba11 100644 --- a/src/modules/graphics/opengl/wrap_Font.cpp +++ b/src/modules/graphics/opengl/wrap_Font.cpp @@ -35,7 +35,7 @@ namespace opengl Font *luax_checkfont(lua_State *L, int idx) { - return luax_checktype(L, idx, Font::type); + return luax_checktype(L, idx); } int w_Font_getHeight(lua_State *L) diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index ae0eaeddd..b2a1533e6 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -442,7 +442,7 @@ int w_newFont(lua_State *L) luax_convobj(L, &idxs[0], (int) idxs.size(), "font", "newRasterizer"); } - love::font::Rasterizer *rasterizer = luax_checktype(L, 1, love::font::Rasterizer::type); + love::font::Rasterizer *rasterizer = luax_checktype(L, 1); luax_catchexcept(L, [&]() { font = instance()->newFont(rasterizer, instance()->getDefaultFilter()); } @@ -464,7 +464,7 @@ int w_newImageFont(lua_State *L) // Convert to ImageData if necessary. if (luax_istype(L, 1, Image::type)) { - Image *i = luax_checktype(L, 1, Image::type); + Image *i = luax_checktype(L, 1); filter = i->getFilter(); const auto &idlevels = i->getImageData(); if (idlevels.empty()) @@ -485,7 +485,7 @@ int w_newImageFont(lua_State *L) luax_convobj(L, &idxs[0], (int) idxs.size(), "font", "newImageRasterizer"); } - love::font::Rasterizer *rasterizer = luax_checktype(L, 1, love::font::Rasterizer::type); + love::font::Rasterizer *rasterizer = luax_checktype(L, 1); // Create the font. Font *font = instance()->newFont(rasterizer, filter); @@ -806,7 +806,7 @@ static Mesh *newCustomMesh(lua_State *L) else if (luax_istype(L, 2, Data::type)) { // Vertex data comes directly from a Data object. - Data *data = luax_checktype(L, 2, Data::type); + Data *data = luax_checktype(L, 2); luax_catchexcept(L, [&](){ t = instance()->newMesh(vertexformat, data->getData(), data->getSize(), drawmode, usage); }); } else @@ -920,7 +920,7 @@ int w_newVideo(lua_State *L) if (!luax_istype(L, 1, love::video::VideoStream::type)) luax_convobj(L, 1, "video", "newVideoStream"); - auto stream = luax_checktype(L, 1, love::video::VideoStream::type); + auto stream = luax_checktype(L, 1); Video *video = nullptr; luax_catchexcept(L, [&]() { video = instance()->newVideo(stream); }); @@ -1004,14 +1004,14 @@ int w_getBackgroundColor(lua_State *L) int w_setNewFont(lua_State *L) { int ret = w_newFont(L); - Font *font = luax_checktype(L, -1, Font::type); + Font *font = luax_checktype(L, -1); instance()->setFont(font); return ret; } int w_setFont(lua_State *L) { - Font *font = luax_checktype(L, 1, Font::type); + Font *font = luax_checktype(L, 1); instance()->setFont(font); return 0; } @@ -1248,7 +1248,7 @@ int w_isWireframe(lua_State *L) int w_newScreenshot(lua_State *L) { - love::image::Image *image = luax_getmodule(L, love::image::Image::type); + love::image::Image *image = luax_getmodule(L); bool copyAlpha = luax_optboolean(L, 1, false); love::image::ImageData *i = 0; @@ -1528,7 +1528,7 @@ int w_draw(lua_State *L) if (luax_istype(L, 2, Quad::type)) { texture = luax_checktexture(L, 1); - quad = luax_totype(L, 2, Quad::type); + quad = luax_totype(L, 2); startidx = 3; } else if (lua_isnil(L, 2) && !lua_isnoneornil(L, 3)) @@ -1537,7 +1537,7 @@ int w_draw(lua_State *L) } else { - drawable = luax_checktype(L, 1, Drawable::type); + drawable = luax_checktype(L, 1); startidx = 2; } diff --git a/src/modules/graphics/opengl/wrap_Image.cpp b/src/modules/graphics/opengl/wrap_Image.cpp index 80c390853..d2444bd98 100644 --- a/src/modules/graphics/opengl/wrap_Image.cpp +++ b/src/modules/graphics/opengl/wrap_Image.cpp @@ -30,7 +30,7 @@ namespace opengl Image *luax_checkimage(lua_State *L, int idx) { - return luax_checktype(L, idx, Image::type); + return luax_checktype(L, idx); } int w_Image_setMipmapFilter(lua_State *L) diff --git a/src/modules/graphics/opengl/wrap_Mesh.cpp b/src/modules/graphics/opengl/wrap_Mesh.cpp index 855197739..1230f2afb 100644 --- a/src/modules/graphics/opengl/wrap_Mesh.cpp +++ b/src/modules/graphics/opengl/wrap_Mesh.cpp @@ -37,7 +37,7 @@ namespace opengl Mesh *luax_checkmesh(lua_State *L, int idx) { - return luax_checktype(L, idx, Mesh::type); + return luax_checktype(L, idx); } static inline size_t writeByteData(lua_State *L, int startidx, int components, char *data) @@ -119,7 +119,7 @@ int w_Mesh_setVertices(lua_State *L) if (luax_istype(L, 2, Data::type)) { - Data *d = luax_checktype(L, 2, Data::type); + Data *d = luax_checktype(L, 2); size_t datasize = std::min(d->getSize(), (t->getVertexCount() - vertoffset) * stride); char *bytedata = (char *) t->mapVertexData() + byteoffset; diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index 700cac2ca..8f7e1884f 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -41,7 +41,7 @@ namespace opengl ParticleSystem *luax_checkparticlesystem(lua_State *L, int idx) { - return luax_checktype(L, idx, ParticleSystem::type); + return luax_checktype(L, idx); } int w_ParticleSystem_clone(lua_State *L) @@ -584,7 +584,7 @@ int w_ParticleSystem_setQuads(lua_State *L) { lua_rawgeti(L, 2, i); - Quad *q = luax_checktype(L, -1, Quad::type); + Quad *q = luax_checktype(L, -1); quads.push_back(q); lua_pop(L, 1); @@ -594,7 +594,7 @@ int w_ParticleSystem_setQuads(lua_State *L) { for (int i = 2; i <= lua_gettop(L); i++) { - Quad *q = luax_checktype(L, i, Quad::type); + Quad *q = luax_checktype(L, i); quads.push_back(q); } } diff --git a/src/modules/graphics/opengl/wrap_Shader.cpp b/src/modules/graphics/opengl/wrap_Shader.cpp index 28d8bc5d1..38a8a76d5 100644 --- a/src/modules/graphics/opengl/wrap_Shader.cpp +++ b/src/modules/graphics/opengl/wrap_Shader.cpp @@ -35,7 +35,7 @@ namespace opengl Shader *luax_checkshader(lua_State *L, int idx) { - return luax_checktype(L, idx, Shader::type); + return luax_checktype(L, idx); } int w_Shader_getWarnings(lua_State *L) diff --git a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp index 93e4606ef..4a2c3ad18 100644 --- a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp +++ b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp @@ -36,7 +36,7 @@ namespace opengl SpriteBatch *luax_checkspritebatch(lua_State *L, int idx) { - return luax_checktype(L, idx, SpriteBatch::type); + return luax_checktype(L, idx); } static inline int w_SpriteBatch_add_or_set(lua_State *L, SpriteBatch *t, int startidx, int index) @@ -45,7 +45,7 @@ static inline int w_SpriteBatch_add_or_set(lua_State *L, SpriteBatch *t, int sta if (luax_istype(L, startidx, Quad::type)) { - quad = luax_totype(L, startidx, Quad::type); + quad = luax_totype(L, startidx); startidx++; } else if (lua_isnil(L, startidx) && !lua_isnoneornil(L, startidx + 1)) @@ -201,7 +201,7 @@ int w_SpriteBatch_attachAttribute(lua_State *L) { SpriteBatch *t = luax_checkspritebatch(L, 1); const char *name = luaL_checkstring(L, 2); - Mesh *m = luax_checktype(L, 3, Mesh::type); + Mesh *m = luax_checktype(L, 3); luax_catchexcept(L, [&](){ t->attachAttribute(name, m); }); return 0; diff --git a/src/modules/graphics/opengl/wrap_Text.cpp b/src/modules/graphics/opengl/wrap_Text.cpp index df965e812..048965fc3 100644 --- a/src/modules/graphics/opengl/wrap_Text.cpp +++ b/src/modules/graphics/opengl/wrap_Text.cpp @@ -29,7 +29,7 @@ namespace opengl Text *luax_checktext(lua_State *L, int idx) { - return luax_checktype(L, idx, Text::type); + return luax_checktype(L, idx); } void luax_checkcoloredstring(lua_State *L, int idx, std::vector &strings) @@ -190,7 +190,7 @@ int w_Text_clear(lua_State *L) int w_Text_setFont(lua_State *L) { Text *t = luax_checktext(L, 1); - Font *f = luax_checktype(L, 2, Font::type); + Font *f = luax_checktype(L, 2); luax_catchexcept(L, [&](){ t->setFont(f); }); return 0; } diff --git a/src/modules/graphics/opengl/wrap_Video.cpp b/src/modules/graphics/opengl/wrap_Video.cpp index fb6966e06..e846b0a10 100644 --- a/src/modules/graphics/opengl/wrap_Video.cpp +++ b/src/modules/graphics/opengl/wrap_Video.cpp @@ -34,7 +34,7 @@ namespace opengl Video *luax_checkvideo(lua_State *L, int idx) { - return luax_checktype