summaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-03-01 17:56:19 -0500
committerkyren <kerriganw@gmail.com>2018-03-01 17:56:19 -0500
commit37feaebdce19fa8d254cc3a2d3e467d80fc12888 (patch)
treed41930aaa704b16ac5d88916e00f250c2e68c9e4 /src/util.rs
parent8ac78c4585a026d5256186341cb2af79558b7164 (diff)
downloadmlua-37feaebdce19fa8d254cc3a2d3e467d80fc12888.zip
Also describe how protect_lua_call functions should not hold types that Drop
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index 10dcac7..f59aaca 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -103,7 +103,8 @@ where
// limited lua stack. `nargs` and `nresults` are similar to the parameters of `lua_pcall`, but the
// given function return type is not the return value count, instead the inner function return
// values are assumed to match the `nresults` param. Internally uses 3 extra stack spaces, and does
-// not call checkstack. Provided function must *not* panic.
+// not call checkstack. Provided function must *not* panic, and since it will generally be
+// lonjmping, should not contain any values that implement Drop.
pub unsafe fn protect_lua_call<F, R>(
state: *mut ffi::lua_State,
nargs: c_int,