Skip to content

Commit

Permalink
Merge pull request #1074 from godot-rust/qol/tools
Browse files Browse the repository at this point in the history
Tooling updates
  • Loading branch information
Bromeon authored Apr 6, 2024
2 parents 7e55836 + 54677d3 commit 3e58896
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/external-config/public-docs-token.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MTFBQUZNN0NBMHVoSTJTeUk2OEptdl9Ea1pzdTlEbWZtUHRTdldzVnJDT0dibnA2Z2FZNk9OaHoxeEdObnpMMGx6UTVVRTJNM0Ezdjk3RXJjTAo=
MTFBQUZNN0NBMGZzSGFaOVJFSmRtdV9IYnJXVEFZVEoxNDJ3N3VPTG1UY3UyTnlQM1h2RXNoMjZTMmNtdEhLa2hOQlFOVllWTVlhSTE1bk1JUwo=
1 change: 1 addition & 0 deletions bindings-generator/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub fn generate_method_table(api: &Api, class: &GodotClass) -> TokenStream {
#(#impl_methods),*
};

#[allow(static_mut_refs)]
&mut TABLE
}

Expand Down
2 changes: 1 addition & 1 deletion gdnative-core/src/core_types/geom/rect2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl Rect2 {

/// Error indicating that an `i64` cannot be converted to a [`Margin`].
#[derive(Debug)]
pub struct MarginError(i64);
pub struct MarginError(pub i64);

/// Provides compatibility with Godot's [`Margin` enum][margin] through the [`TryFrom`] trait.
///
Expand Down
2 changes: 1 addition & 1 deletion gdnative-core/src/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ impl<T: GodotObject> Ref<T, Unique> {
// Classes with NUL-bytes in their names can not exist
let class_name = CString::new(class_name).ok()?;
let ctor = (get_api().godot_get_class_constructor)(class_name.as_ptr())?;
let ptr = NonNull::new(ctor() as *mut sys::godot_object)?;
let ptr = NonNull::new(ctor().cast::<sys::godot_object>())?;
<T::Memory as MemorySpec>::impl_from_maybe_ref_counted(ptr)
}
}
Expand Down
1 change: 1 addition & 0 deletions gdnative-core/src/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ macro_rules! make_method_table {
$($methods: std::ptr::null_mut(),)*
};

#[allow(static_mut_refs)]
&mut TABLE
}

Expand Down

0 comments on commit 3e58896

Please sign in to comment.