Blob Blame History Raw
--- a/bam.lua~	2018-03-16 09:49:01.000000000 -0500
+++ b/bam.lua	2018-03-16 09:49:37.147140638 -0500
@@ -1,4 +1,4 @@
-CheckVersion("0.4")
+CheckVersion("0.5")
 
 Import("configure.lua")
 Import("other/sdl/sdl.lua")
--- a/configure.lua~	2016-11-07 16:30:50.000000000 -0600
+++ b/configure.lua	2018-03-19 12:08:21.952434870 -0500
@@ -5,6 +5,24 @@
 	TODO
 @END]]--
 function NewConfig(on_configured_callback)
+	local function setfenv(fn, env)
+	  local i = 1
+	  while true do
+	    local name = debug.getupvalue(fn, i)
+	    if name == "_ENV" then
+	      debug.upvaluejoin(fn, i, (function()
+		return env
+	      end), 1)
+	      break
+	    elseif not name then
+	      break
+	    end
+
+	    i = i + 1
+	  end
+
+	  return fn
+	end
 	local config = {}
 
 	config.OnConfigured = function(self)