Don't bother with a feature, just disable LUA_USE_APICHECK in release

This commit is contained in:
kyren 2018-02-09 23:59:11 -05:00
parent 60743d45cd
commit f785a3abe4
2 changed files with 1 additions and 7 deletions

View File

@ -22,12 +22,6 @@ default = ["builtin-lua"]
# * LUA_NUMBER as double # * LUA_NUMBER as double
# * LUA_EXTRASPACE is sizeof(void*) # * LUA_EXTRASPACE is sizeof(void*)
builtin-lua = ["gcc"] builtin-lua = ["gcc"]
# Don't define LUA_USE_APICHECK if we are in release mode. When
# debug_assertions are enabled, LUA_USE_APICHECK is enabled regardless. There
# are still a few known ways to trigger LUA_USE_APICHECK checks with rlua, but
# when these bugs are fixed, this option will go away and this behavior will be
# the default.
disable-lua-apicheck = []
[dependencies] [dependencies]
libc = { version = "0.2" } libc = { version = "0.2" }

View File

@ -21,7 +21,7 @@ fn main() {
config.define("LUA_USE_WINDOWS", None); config.define("LUA_USE_WINDOWS", None);
} }
if cfg!(debug_assertions) || !cfg!(feature = "disable-lua-apicheck") { if cfg!(debug_assertions) {
config.define("LUA_USE_APICHECK", None); config.define("LUA_USE_APICHECK", None);
} }