Skip to content

Commit

Permalink
Add dyninstAPI/DynCommon.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 9b6eb43 commit ca66f69
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/dyninstAPI/developer/Relocation/DynCommon.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@
DynCommon.h
###########

.. cpp:namespace:: Dyninst::Relocation
Shortcuts for type casting

.. code:: cpp
#define DYN_CAST(type, obj) boost::dynamic_pointer_cast<type>(obj)
#define SCAST_MO(o) static_cast<mapped_object*>(o)
#define SCAST_EI(e) static_cast<edge_instance*>(e)
#define SCAST_BI(b) static_cast<block_instance*>(b)
#define SCAST_PB(b) static_cast<parse_block*>(b)
#define SCAST_PF(f) static_cast<parse_func*>(f)
#define SCAST_FI(f) static_cast<func_instance*>(f)

0 comments on commit ca66f69

Please sign in to comment.