Skip to content

Commit

Permalink
Do not load modules that will not be supported for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsauce committed Mar 19, 2015
1 parent e4798b8 commit b1db522
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions turbo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
-- It is different from all the other Lua HTTP servers out there in that it's
-- modern, fresh, object oriented and easy to modify.
-- It is written in pure Lua, there are no Lua C modules instead it uses the
-- LuaJIT FFI to do socket and event handling. Users of the Tornado web
-- server will recognize the API offered pretty quick.
-- LuaJIT FFI to do socket and event handling (only applies for Linux).
-- Users of the Tornado web server will recognize the API offered pretty quick.
--
-- If you do not know Lua then do not fear as its probably one of the easiest
-- languages to learn if you know C, Python or Javascript from before.
Expand Down Expand Up @@ -95,7 +95,9 @@ if not turbo.platform.__LINUX__ then
end
_G.__TURBO_USE_LUASOCKET__ = true
elseif _G.__TURBO_USE_LUASOCKET__ then
turbo.log.warning("_G.__TURBO_USE_LUASOCKET__ set, using LuaSocket (degraded performance).")
turbo.log.warning(
"_G.__TURBO_USE_LUASOCKET__ set,"..
" using LuaSocket (degraded performance).")
end
turbo.ioloop = require "turbo.ioloop"
turbo.escape = require "turbo.escape"
Expand All @@ -109,13 +111,15 @@ turbo.web = require "turbo.web"
turbo.util = require "turbo.util"
turbo.coctx = require "turbo.coctx"
turbo.websocket = require "turbo.websocket"
turbo.signal = require "turbo.signal"
turbo.socket = require "turbo.socket_ffi"
turbo.sockutil = require "turbo.sockutil"
turbo.hash = require "turbo.hash"
turbo.syscall = require "turbo.syscall"
turbo.inotify = require "turbo.inotify"
turbo.fs = require "turbo.fs"
if turbo.platform.__LINUX__ then
turbo.inotify = require "turbo.inotify"
turbo.fs = require "turbo.fs"
turbo.signal = require "turbo.signal"
turbo.syscall = require "turbo.syscall"
end
turbo.structs = {}
turbo.structs.deque = require "turbo.structs.deque"
turbo.structs.buffer = require "turbo.structs.buffer"
Expand Down

0 comments on commit b1db522

Please sign in to comment.