summaryrefslogtreecommitdiff
path: root/rust/src/architecture.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-04-17 08:14:00 -0300
committerRubens Brandao <git@rubens.io>2024-04-17 08:14:00 -0300
commit58673b20ef858ae5d4d7b1ff0dec1460a0f36e5f (patch)
treebdfd5dff219829438d2069fc433cae280002c1c6 /rust/src/architecture.rs
parent90040508478f4551eb303a5056026fd59bb0cdc6 (diff)
use Ref to own types
Diffstat (limited to 'rust/src/architecture.rs')
-rw-r--r--rust/src/architecture.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/src/architecture.rs b/rust/src/architecture.rs
index 82df7441..9b5b36b4 100644
--- a/rust/src/architecture.rs
+++ b/rust/src/architecture.rs
@@ -313,7 +313,7 @@ pub trait Intrinsic: Sized + Clone + Copy {
fn id(&self) -> u32;
/// Reeturns the list of the input names and types for this intrinsic.
- fn inputs(&self) -> Vec<NameAndType>;
+ fn inputs(&self) -> Vec<Ref<NameAndType>>;
/// Returns the list of the output types for this intrinsic.
fn outputs(&self) -> Vec<Conf<Ref<Type>>>;
@@ -650,7 +650,7 @@ impl Intrinsic for UnusedIntrinsic {
fn id(&self) -> u32 {
unreachable!()
}
- fn inputs(&self) -> Vec<NameAndType> {
+ fn inputs(&self) -> Vec<Ref<NameAndType>> {
unreachable!()
}
fn outputs(&self) -> Vec<Conf<Ref<Type>>> {
@@ -992,7 +992,7 @@ impl Intrinsic for crate::architecture::CoreIntrinsic {
self.1
}
- fn inputs(&self) -> Vec<NameAndType> {
+ fn inputs(&self) -> Vec<Ref<NameAndType>> {
let mut count: usize = 0;
unsafe {
@@ -1172,7 +1172,7 @@ impl Architecture for CoreArchitecture {
}
}
}
-
+
fn instruction_llil(
&self,
data: &[u8],
@@ -2424,7 +2424,7 @@ where
let inputs = intrinsic.inputs();
let mut res = Vec::with_capacity(inputs.len());
for input in inputs {
- res.push(input.into_raw());
+ res.push(unsafe { Ref::into_raw(input) }.into_raw());
}
unsafe {