From 64e064330c5c595d0b8553028e0c5ca95c5e5392 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 19 Jun 2012 18:32:22 +0200 Subject: Lua: Remove Lua --- src/lua/define.lua | 72 ------------------------------------------------------ 1 file changed, 72 deletions(-) delete mode 100644 src/lua/define.lua (limited to 'src/lua/define.lua') diff --git a/src/lua/define.lua b/src/lua/define.lua deleted file mode 100644 index db64db50..00000000 --- a/src/lua/define.lua +++ /dev/null @@ -1,72 +0,0 @@ --- tolua: define class --- Written by Waldemar Celes --- TeCGraf/PUC-Rio --- Jul 1998 --- $Id: define.lua,v 1.2 2001/11/26 23:00:23 darkgod Exp $ - --- This code is free software; you can redistribute it and/or modify it. --- The software provided hereunder is on an "as is" basis, and --- the author has no obligation to provide maintenance, support, updates, --- enhancements, or modifications. - - --- Define class --- Represents a numeric const definition --- The following filds are stored: --- name = constant name -classDefine = { - name = '', - _base = classFeature, -} -settag(classDefine,tolua_tag) - --- register define -function classDefine:register () - local p = self:inmodule() - if p then - output(' tolua_constant(tolua_S,"'..p..'","'..self.lname..'",'..self.name..');') - else - output(' tolua_constant(tolua_S,NULL,"'..self.lname..'",'..self.name..');') - end -end - --- unregister define -function classDefine:unregister () - if not self:inmodule() then - output(' lua_pushnil(tolua_S); lua_setglobal(tolua_S,"'..self.lname..'");') - end -end - --- Print method -function classDefine:print (ident,close) - print(ident.."Define{") - print(ident.." name = '"..self.name.."',") - print(ident.." lname = '"..self.lname.."',") - print(ident.."}"..close) -end - - --- Internal constructor -function _Define (t) - t._base = classDefine - settag(t,tolua_tag) - - if t.name == '' then - error("#invalid define") - end - - append(t) - return t -end - --- Constructor --- Expects a string representing the constant name -function Define (n) - local t = split(n,'@') - return _Define { - name = t[1], - lname = t[2] or t[1] - } -end - - -- cgit v1.2.3