Line data Source code
1 : use lief_ffi as ffi;
2 :
3 : use crate::common::FromFFI;
4 : use crate::dwarf::editor::types::EditorType;
5 :
6 : /// This structure represents a `DW_TAG_pointer_type` DWARF type.
7 : pub struct Pointer {
8 : ptr: cxx::UniquePtr<ffi::DWARF_editor_PointerType>,
9 : }
10 :
11 : impl FromFFI<ffi::DWARF_editor_PointerType> for Pointer {
12 0 : fn from_ffi(cmd: cxx::UniquePtr<ffi::DWARF_editor_PointerType>) -> Self {
13 0 : Self {
14 0 : ptr: cmd,
15 0 : }
16 0 : }
17 : }
18 :
19 :
20 : impl EditorType for Pointer {
21 0 : fn get_base(&self) -> &ffi::DWARF_editor_Type {
22 0 : self.ptr.as_ref().unwrap().as_ref()
23 0 : }
24 : }
25 :
|