pub unsafe fn push_userdata<T>(state: *mut ffi::lua_State, t: T) -> Result<()> {
    let ud = protect_lua(state, 0, 1, |state| {
        ffi::lua_newuserdata(state, mem::size_of::<T>()) as *mut T
    })?;
    ptr::write(ud, t);
    Ok(())
}
// Internally uses 3 stack spaces, does not call checkstack.
Internally uses 3 stack spaces, does not call checkstack.
Internally uses 3 stack spaces does not call checkstack .
pub unsafe fn push_userdata<T>(state: *mut ffi::lua_State, t: T) -> Result<()> {
    let ud = protect_lua(state, 0, 1, |state| {
        ffi::lua_newuserdata(state, mem::size_of::<T>()) as *mut T
    })?;
    ptr::write(ud, t);
    Ok(())
}
pub unsafe fn push_userdata < T > ( state : * mut ffi :: lua_State , t : T ) -> Result < ( ) > { let ud = protect_lua ( state , 0 , 1 , | state | { ffi :: lua_newuserdata ( state , mem :: size_of :: < T > ( ) ) as * mut T } ) ? ; ptr :: write ( ud , t ) ; Ok ( ( ) ) }
Internally uses 3 stack spaces, does not call checkstack.
Internally uses 3 stack spaces does not call checkstack .
state
*mut ffi::lua_State
t
T
state
*mut ffi::lua_State
t
T