Rizin
unix-like reverse engineering framework and cli tools
cycles.c File Reference
#include <rz_analysis.h>
#include <rz_list.h>
#include <rz_types.h>

Go to the source code of this file.

Functions

RZ_API RzAnalysisCycleFramerz_analysis_cycle_frame_new (void)
 
RZ_API void rz_analysis_cycle_frame_free (RzAnalysisCycleFrame *cf)
 

Function Documentation

◆ rz_analysis_cycle_frame_free()

RZ_API void rz_analysis_cycle_frame_free ( RzAnalysisCycleFrame cf)

Definition at line 18 of file cycles.c.

18  {
19  if (!cf) {
20  return;
21  }
22  rz_list_free(cf->hooks);
23  free(cf);
24 }
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137

References free(), rz_analysis_cycle_frame_t::hooks, and rz_list_free().

Referenced by rz_core_analysis_cycles().

◆ rz_analysis_cycle_frame_new()

RZ_API RzAnalysisCycleFrame* rz_analysis_cycle_frame_new ( void  )

Definition at line 8 of file cycles.c.

8  {
10  if (cf) {
11  if (!(cf->hooks = rz_list_new())) {
12  RZ_FREE(cf);
13  }
14  }
15  return cf;
16 }
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
Definition: list.c:235
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define RZ_FREE(x)
Definition: rz_types.h:369

References rz_analysis_cycle_frame_t::hooks, RZ_FREE, rz_list_new(), and RZ_NEW0.

Referenced by rz_core_analysis_cycles().