File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ fn dump_dwarf(bv: &BinaryView) {
281281 }
282282 }
283283
284- view. show_graph_report ( "DWARF" , graph) ;
284+ view. show_graph_report ( "DWARF" , & graph) ;
285285}
286286
287287struct DWARFDump ;
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ fn test_graph(view: &BinaryView) {
3636 & EdgeStyle :: default ( ) ,
3737 ) ;
3838
39- view. show_graph_report ( "Rust Graph Title" , graph) ;
39+ view. show_graph_report ( "Rust Graph Title" , & graph) ;
4040}
4141
4242#[ no_mangle]
Original file line number Diff line number Diff line change @@ -1064,7 +1064,7 @@ pub trait BinaryViewExt: BinaryViewBase {
10641064 unsafe { BNApplyDebugInfo ( self . as_ref ( ) . handle , debug_info. handle ) }
10651065 }
10661066
1067- fn show_graph_report < S : BnStrCompatible > ( & self , raw_name : S , graph : FlowGraph ) {
1067+ fn show_graph_report < S : BnStrCompatible > ( & self , raw_name : S , graph : & FlowGraph ) {
10681068 let raw_name = raw_name. into_bytes_with_nul ( ) ;
10691069 unsafe {
10701070 BNShowGraphReport (
Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ impl<'a> ToOwned for FlowGraphNode<'a> {
114114 }
115115}
116116
117- // TODO : FlowGraph are RefCounted objects, this needs to be changed to only return Refs to FlowGraph
118-
119117#[ derive( PartialEq , Eq , Hash ) ]
120118pub struct FlowGraph {
121119 pub ( crate ) handle : * mut BNFlowGraph ,
@@ -126,8 +124,8 @@ impl FlowGraph {
126124 Self { handle : raw }
127125 }
128126
129- pub fn new ( ) -> Self {
130- unsafe { FlowGraph :: from_raw ( BNCreateFlowGraph ( ) ) }
127+ pub fn new ( ) -> Ref < Self > {
128+ unsafe { Ref :: new ( FlowGraph :: from_raw ( BNCreateFlowGraph ( ) ) ) }
131129 }
132130
133131 pub fn append ( & self , node : & FlowGraphNode ) -> usize {
You can’t perform that action at this time.
0 commit comments