diff options
author | kyren <kerriganw@gmail.com> | 2018-02-06 20:23:16 -0500 |
---|---|---|
committer | kyren <kerriganw@gmail.com> | 2018-02-06 20:53:25 -0500 |
commit | cb25a99f70b00b2cf2b1fc0ec0000d6fd89cfe9a (patch) | |
tree | d6f468d5d4022336e2d8dec370da2951fe02f0bd /src/ffi.rs | |
parent | 7780a91e192e1ed5a946d97062bb68449a9f96b9 (diff) | |
download | mlua-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.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |