aop_dynval Struct Reference
Representation of a runtime value. More...
Detailed Description
Representation of a runtime value.
An aop_dynval serves as a placeholder during compile time for a value that will not be known until runtime. An aop_dynval gets returned by a capture function, such as aop_capture_call_return_value(), and can be passed to an advice function inserted with aop_insert_advice().
Internally, every aop_dynval has its own type, which is determined by how it was captured. For example, an aop_dynval created with aop_capture_call_return_value() will have its type set based on how the corresponding pointcut was filtered using aop_filter_call_pc_by_return_type(). (It is an error to capture the return value of a function call when the corresponding pointcut was not filtered by type. You must use aop_capture_call_return_value_by_type() instead.)
At runtime, the advice function itself simply gets the captured value; it will never see the original aop_dynval object.
Use the AOP_DYNVAL macro when passing an aop_dynval to aop_insert_advice().
All aop_dynval objects are only valid while the aop_joinpoint used to create them remains valid. Because an aop_dynval represents a value captured from a join point, all capture functions that return an aop_dynval take an aop_joinpoint as a parameter. When the aop_joinpoint becomes invalid (when the current callback finishes), these aop_dynval objects also become invalid. See the aop_joinpoint documentation for more information.
- Examples:
-
advice_header.c, and duplicate.c.
The documentation for this struct was generated from the following file:
- src/aop-doxy-main.c
