Skip to content

Commit

Permalink
t wasn't needed filewide, also handle eof gracefully (by stopping the…
Browse files Browse the repository at this point in the history
… repl)
  • Loading branch information
bartbes committed Jan 27, 2013
1 parent 271e8f8 commit 62f0510
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions repler/repler.lua
Expand Up @@ -24,8 +24,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]

local t

local function sprint(...)
local args = {...}
for i, v in ipairs(args) do
Expand Down Expand Up @@ -57,7 +55,7 @@ local function doExecute(command)
end

local function load()
t = love.thread.newThread("repler-thread",
local t = love.thread.newThread("repler-thread",
love.filesystem.newFileData(
[[
require "love.event"
Expand All @@ -70,6 +68,7 @@ local function load()
t = love.thread.getThread()
repeat
local command = prompt()
if not command then break end
love.event.push("repler", t, command)
local result = t:demand("result")
if #result > 0 then
Expand Down

0 comments on commit 62f0510

Please sign in to comment.