From 9a7dd0a0770178529c704c08bc446e3533b1f3e5 Mon Sep 17 00:00:00 2001 From: Julian Laubstein Date: Wed, 4 Nov 2015 22:32:11 +0100 Subject: Outsourced all libraries into submodules --- lib/tolua++ | 1 + lib/tolua++/src/bin/lua/compat-5.1.lua | 64 ---------------------------------- 2 files changed, 1 insertion(+), 64 deletions(-) create mode 160000 lib/tolua++ delete mode 100644 lib/tolua++/src/bin/lua/compat-5.1.lua (limited to 'lib/tolua++/src/bin/lua/compat-5.1.lua') diff --git a/lib/tolua++ b/lib/tolua++ new file mode 160000 index 000000000..9181fc9ef --- /dev/null +++ b/lib/tolua++ @@ -0,0 +1 @@ +Subproject commit 9181fc9ef73fa1c052f968d68dc60538f144a474 diff --git a/lib/tolua++/src/bin/lua/compat-5.1.lua b/lib/tolua++/src/bin/lua/compat-5.1.lua deleted file mode 100644 index c0a3ec388..000000000 --- a/lib/tolua++/src/bin/lua/compat-5.1.lua +++ /dev/null @@ -1,64 +0,0 @@ -if string.find(_VERSION, "5%.0") then - return -end - --- "loadfile" -local function pp_dofile(path) - - local loaded = false - local getfile = function() - - if loaded then - return - else - local file,err = io.open(path) - if not file then - error("error loading file "..path..": "..err) - end - local ret = file:read("*a") - file:close() - - ret = string.gsub(ret, "%.%.%.%s*%)$", "...) local arg = {n=select('#', ...), ...};") - - loaded = true - return ret - end - end - - local f, err = load(getfile, path) - if not f then - error("error loading file " .. path .. ": " .. err) - end - return f() -end - -old_dofile = dofile -dofile = pp_dofile - - --- string.gsub ---[[ -local ogsub = string.gsub -local function compgsub(a,b,c,d) - if type(c) == "function" then - local oc = c - c = function (...) return oc(...) or '' end - end - return ogsub(a,b,c,d) -end -string.repl = ogsub ---]] - ---string.gsub = compgsub - - - - --- Lua 5.2+ and LuaJit don't have string.gfind(). Use string.gmatch() instead: -if not(string.gfind) then - string.gfind = string.gmatch -end - - - - -- cgit v1.2.3