From bb56b5547608a74274c928d8b48939e4b2c990ae Mon Sep 17 00:00:00 2001 From: Zachary Boehm Date: Tue, 25 Aug 2026 19:22:03 -0500 Subject: [PATCH] [fix] add LICENSE comments to userdata macros referencing mlua --- README.md | 4 +-- mlua_extras_derive/Cargo.lock | 2 +- mlua_extras_derive/src/userdata/mod.rs | 31 +++++++++++++++++++ .../src/userdata/userdata_impl.rs | 31 +++++++++++++++++++ 4 files changed, 65 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 217429d..41bddbd 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ fn main() -> mlua::Result<()> { .register::("Color")? .register::("Example") .document("Example module") - .value::("example") + .proxy::("example") .function::("printColor", ()) .document("Greet the name that was passed in") .param("name", "Name of the person to greet") @@ -405,7 +405,7 @@ local _CLASS_Counter_ = { --- Increment the counter --- @param self Counter increment = function(self) end, - --- + --- Transform the value to `up` --- @param value any Macro defined param doc comment transform = function(self, value) end, __metatable = { diff --git a/mlua_extras_derive/Cargo.lock b/mlua_extras_derive/Cargo.lock index 6c15e5a..ee87838 100644 --- a/mlua_extras_derive/Cargo.lock +++ b/mlua_extras_derive/Cargo.lock @@ -137,7 +137,7 @@ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "mlua-extras-derive" -version = "11.6.0" +version = "12.0.0" dependencies = [ "darling", "deluxe", diff --git a/mlua_extras_derive/src/userdata/mod.rs b/mlua_extras_derive/src/userdata/mod.rs index b9a6622..61ad7e4 100644 --- a/mlua_extras_derive/src/userdata/mod.rs +++ b/mlua_extras_derive/src/userdata/mod.rs @@ -1,3 +1,34 @@ +//! Both mlua and rlua are distributed under the MIT license, which is reproduced +//! below: +//! +//! MIT License +//! +//! Copyright (c) 2019-2021 A. Orlenko +//! Copyright (c) 2017 rlua +//! +//! Permission is hereby granted, free of charge, to any person obtaining a copy +//! of this software and associated documentation files (the "Software"), to deal +//! in the Software without restriction, including without limitation the rights +//! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//! copies of the Software, and to permit persons to whom the Software is +//! furnished to do so, subject to the following conditions: +//! +//! The above copyright notice and this permission notice shall be included in all +//! copies or substantial portions of the Software. +//! +//! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//! SOFTWARE. +//! +//! The above notice applies to this file's code as a large portion is copied from, or closely replicates `mlua` to provide +//! a similar experience while giving additional type information to `mlua_extras` typing system. +//! +//! https://github.com/mlua-rs/mlua/blob/main/mlua_derive/src/userdata/mod.rs + use proc_macro2::TokenStream; use syn::{Attribute, Data, DeriveInput, Error, Fields, FieldsNamed, Meta}; diff --git a/mlua_extras_derive/src/userdata/userdata_impl.rs b/mlua_extras_derive/src/userdata/userdata_impl.rs index 8bd2f11..4494fd4 100644 --- a/mlua_extras_derive/src/userdata/userdata_impl.rs +++ b/mlua_extras_derive/src/userdata/userdata_impl.rs @@ -1,3 +1,34 @@ +//! Both mlua and rlua are distributed under the MIT license, which is reproduced +//! below: +//! +//! MIT License +//! +//! Copyright (c) 2019-2021 A. Orlenko +//! Copyright (c) 2017 rlua +//! +//! Permission is hereby granted, free of charge, to any person obtaining a copy +//! of this software and associated documentation files (the "Software"), to deal +//! in the Software without restriction, including without limitation the rights +//! to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +//! copies of the Software, and to permit persons to whom the Software is +//! furnished to do so, subject to the following conditions: +//! +//! The above copyright notice and this permission notice shall be included in all +//! copies or substantial portions of the Software. +//! +//! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +//! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +//! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +//! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +//! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +//! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +//! SOFTWARE. +//! +//! The above notice applies to this file's code as a large portion is copied from, or closely replicates `mlua` to provide +//! a similar experience while giving additional type information to `mlua_extras` typing system. +//! +//! https://github.com/mlua-rs/mlua/blob/main/mlua_derive/src/userdata/userdata_impl.rs + use std::sync::atomic::{AtomicUsize, Ordering}; use proc_macro2::{Span, TokenStream};