summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-04 14:35:34 -0400
committerNeil Moore <neil@s-z.org>2014-06-04 14:35:34 -0400
commit8ca96ae944f1b013de7473660c56506bd14acbef (patch)
tree3406a83b82d3068a36ec3a1a93bc38697290c95b /crawl-ref/source/clua.cc
parent97cf85e3ad4f3c109adc8a6e0f1ed4163876178b (diff)
downloadcrawl-ref-8ca96ae944f1b013de7473660c56506bd14acbef.tar.gz
crawl-ref-8ca96ae944f1b013de7473660c56506bd14acbef.zip
Rearrange some comments.
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index b9d9d8b7a4..ef8c177c58 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -18,6 +18,8 @@
#define BUGGY_PCALL_ERROR "667: Malformed response to guarded pcall."
#define BUGGY_SCRIPT_ERROR "666: Killing badly-behaved Lua script."
+// 64-bit luajit does not support custom allocators. Only checking
+// TARGET_CPU_X64 because luajit doesn't support other 64-bit archs.
#if defined(USE_LUAJIT) && defined(TARGET_CPU_X64)
#define NO_CUSTOM_ALLOCATOR
#endif
@@ -640,16 +642,14 @@ void CLua::init_lua()
if (_state)
return;
- // 64-bit luajit does not support custom allocators. Only checking
- // TARGET_CPU_X64 because luajit doesn't support other 64-bit archs.
#ifdef NO_CUSTOM_ALLOCATOR
- _state = luaL_newstate();
// If this is likely to be used as a server, warn the builder.
-# if defined(USE_TILE_WEB) || defined(DGAMELAUNCH)
// NOTE: #warning doesn't work on MSVC, so this will be fatal there
// (not that webtiles or dgamelaunch are supported on Windows anyway).
+# if defined(USE_TILE_WEB) || defined(DGAMELAUNCH)
# warning Detected 64-bit Luajit, disabling CLua memory throttling.
# endif
+ _state = luaL_newstate();
#else
// Throttle memory usage in managed (clua) VMs
_state = managed_vm? lua_newstate(_clua_allocator, this) : luaL_newstate();