Lua state pointer shouldn't be Send

This commit is contained in:
William Venner 2022-01-26 20:33:27 +00:00
parent 48f51fd444
commit fbbeb80934
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -135,7 +135,7 @@ dependencies = [
[[package]] [[package]]
name = "gmod" name = "gmod"
version = "12.0.1" version = "13.0.0"
dependencies = [ dependencies = [
"cfg_table 1.0.0", "cfg_table 1.0.0",
"cstr", "cstr",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "gmod" name = "gmod"
version = "12.0.1" version = "13.0.0"
authors = ["William Venner <william@venner.io>"] authors = ["William Venner <william@venner.io>"]
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"

View File

@ -7,7 +7,7 @@ use crate::userdata::TaggedUserData;
#[repr(transparent)] #[repr(transparent)]
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub struct LuaState(pub *mut std::ffi::c_void); pub struct LuaState(pub *mut std::ffi::c_void);
unsafe impl Send for LuaState {}
impl LuaState { impl LuaState {
pub unsafe fn new() -> Result<Self, LuaError> { pub unsafe fn new() -> Result<Self, LuaError> {
let lua = (LUA_SHARED.lual_newstate)(); let lua = (LUA_SHARED.lual_newstate)();