You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-08-10 22:41:43 +02:00
Fastfix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use addin1c::{Variant, ParamValue};
|
||||
use crate::core::AddIn;
|
||||
use crate::component::AddIn;
|
||||
|
||||
pub fn send_message(obj: &AddIn, params: &[Variant]) -> String {
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
mod methods;
|
||||
|
||||
use addin1c::{name, Variant};
|
||||
use crate::core::getset;
|
||||
|
||||
|
||||
// МЕТОДЫ КОМПОНЕНТЫ -------------------------------------------------------------------------------
|
||||
@@ -57,14 +58,14 @@ impl AddIn {
|
||||
}
|
||||
|
||||
// Сюда просто нужно еще раз добавить имена полей
|
||||
pub fn get_field_ptr<T>(&self, index: usize) -> *const T {
|
||||
pub fn get_field_ptr(&self, index: usize) -> *const dyn getset::ValueType {
|
||||
match index {
|
||||
0 => &self.field1 as *const _,
|
||||
1 => &self.field2 as *const _,
|
||||
0 => &self.field1 as &dyn getset::ValueType as *const _,
|
||||
1 => &self.field2 as &dyn getset::ValueType as *const _,
|
||||
_ => panic!("Index out of bounds"),
|
||||
}
|
||||
}
|
||||
pub fn get_field_ptr_mut<T>(&mut self, index: usize) -> *mut T { self.get_field_ptr(index) as *mut _ }
|
||||
pub fn get_field_ptr_mut(&mut self, index: usize) -> *mut dyn getset::ValueType { self.get_field_ptr(index) as *mut _ }
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
@@ -7,7 +7,7 @@ use std::{
|
||||
sync::atomic::{AtomicI32, Ordering},
|
||||
};
|
||||
|
||||
use core::AddIn;
|
||||
use component::AddIn;
|
||||
use addin1c::{create_component, destroy_component, name, AttachType};
|
||||
|
||||
pub static mut PLATFORM_CAPABILITIES: AtomicI32 = AtomicI32::new(-1);
|
||||
|
Reference in New Issue
Block a user