summaryrefslogtreecommitdiff
path: root/src/ffi.rs
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-02-06 20:23:16 -0500
committerkyren <kerriganw@gmail.com>2018-02-06 20:53:25 -0500
commitcb25a99f70b00b2cf2b1fc0ec0000d6fd89cfe9a (patch)
treed6f468d5d4022336e2d8dec370da2951fe02f0bd /src/ffi.rs
parent7780a91e192e1ed5a946d97062bb68449a9f96b9 (diff)
downloadmlua-cb25a99f70b00b2cf2b1fc0ec0000d6fd89cfe9a.zip
Lots of changes, not sure if actually safe yet.
* Make Lua Send * Add Send bounds to (nearly) all instances where userdata and functions are passed to Lua * Add a "scope" method which takes a callback that accepts a `Scope`, and give `Scope` the ability to create functions and userdata that are !Send, *and also functions that are not even 'static!*.
Diffstat (limited to 'src/ffi.rs')
-rw-r--r--src/ffi.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ffi.rs b/src/ffi.rs
index 9130afd..dfb2878 100644
--- a/src/ffi.rs
+++ b/src/ffi.rs
@@ -124,6 +124,9 @@ extern "C" {
pub fn lua_setuservalue(state: *mut lua_State, index: c_int);
pub fn lua_getuservalue(state: *mut lua_State, index: c_int) -> c_int;
+ pub fn lua_getupvalue(state: *mut lua_State, funcindex: c_int, n: c_int) -> *const c_char;
+ pub fn lua_setupvalue(state: *mut lua_State, funcindex: c_int, n: c_int) -> *const c_char;
+
pub fn lua_settable(state: *mut lua_State, index: c_int);
pub fn lua_rawset(state: *mut lua_State, index: c_int);
pub fn lua_setmetatable(state: *mut lua_State, index: c_int);