Skip to content

Commit 33ce43b

Browse files
committed
Remove feature 'nativescript'
1 parent 3566f92 commit 33ce43b

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

gdnative-core/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ workspace = ".."
1111
edition = "2018"
1212

1313
[features]
14-
default = ["nativescript"]
14+
default = []
1515
gd_test = []
16-
nativescript = ["bitflags", "parking_lot"]
1716
type_tag_fallback = []
1817

1918
[dependencies]

gdnative-core/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ mod macros;
4242

4343
pub mod core_types;
4444

45-
#[cfg(feature = "nativescript")]
4645
pub mod export;
47-
4846
pub mod init;
4947
pub mod log;
5048
pub mod object;

gdnative-core/src/object/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ use std::marker::PhantomData;
1414
use std::ops::Deref;
1515
use std::ptr::NonNull;
1616

17-
#[cfg(feature = "nativescript")]
1817
use crate::export::{Instance, NativeClass, RefInstance};
19-
2018
use crate::private::{get_api, ManuallyManagedClassPlaceholder, ReferenceCountedClassPlaceholder};
2119
use crate::sys;
2220
use bounds::{AssumeSafeLifetime, LifetimeConstraint, PtrWrapper, RefKindSpec};
@@ -488,7 +486,6 @@ where
488486
///
489487
/// The resulting `Instance` is not necessarily safe to use directly.
490488
#[inline]
491-
#[cfg(feature = "nativescript")]
492489
pub fn cast_instance<C>(self) -> Option<Instance<C, Access>>
493490
where
494491
C: NativeClass<Base = T>,
@@ -502,7 +499,6 @@ where
502499
///
503500
/// Returns `Err(self)` if the cast failed.
504501
#[inline]
505-
#[cfg(feature = "nativescript")]
506502
pub fn try_cast_instance<C>(self) -> Result<Instance<C, Access>, Self>
507503
where
508504
C: NativeClass<Base = T>,
@@ -934,7 +930,6 @@ impl<'a, T: GodotObject, Access: ThreadAccess> TRef<'a, T, Access> {
934930

935931
/// Convenience method to downcast to `RefInstance` where `self` is the base object.
936932
#[inline]
937-
#[cfg(feature = "nativescript")]
938933
pub fn cast_instance<C>(self) -> Option<RefInstance<'a, C, Access>>
939934
where
940935
C: NativeClass<Base = T>,

gdnative-core/src/private.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ pub unsafe fn bind_api(options: *mut sys::godot_gdnative_init_options) -> bool {
3333

3434
ObjectMethodTable::get(get_api());
3535
ReferenceMethodTable::get(get_api());
36-
#[cfg(feature = "nativescript")]
37-
{
38-
NativeScriptMethodTable::get(get_api());
39-
}
36+
NativeScriptMethodTable::get(get_api());
4037

4138
true
4239
}
@@ -112,11 +109,9 @@ pub fn get_gdnative_library_sys() -> *mut sys::godot_object {
112109
/// This is intended to be an internal interface.
113110
#[inline]
114111
pub unsafe fn cleanup_internal_state() {
115-
#[cfg(feature = "nativescript")]
116-
{
117-
crate::export::type_tag::cleanup();
118-
crate::export::class_registry::cleanup();
119-
}
112+
crate::export::type_tag::cleanup();
113+
crate::export::class_registry::cleanup();
114+
120115
GODOT_API = None;
121116
}
122117

@@ -227,7 +222,6 @@ make_method_table!(struct ReferenceMethodTable for Reference {
227222

228223
// Add this one here too. It's not easy to use this macro from the
229224
// export module without making this macro public.
230-
#[cfg(feature = "nativescript")]
231225
make_method_table!(struct NativeScriptMethodTable for NativeScript {
232226
set_class_name,
233227
set_library,

0 commit comments

Comments
 (0)