This is to strengthen the separation between call_param and in_param.
* pointcut, only the last one will have any effect.
*
* Note that you must filter a parameter by its type in order to
- * capture it with aop_capture_param().
+ * capture it with aop_capture_call_param().
* \param pc The function call pointcut to filter. Function call
* pointcuts are created with aop_match_function_call().
* \param n The index of the parameter to filter on. Parameters are
* aop_filter_call_pc_by_param().
*/
struct aop_dynval *
-aop_capture_param (struct aop_joinpoint *jp, int n)
+aop_capture_call_param (struct aop_joinpoint *jp, int n)
{
struct aop_pointcut *pc;
struct aop_dynval *dv;
* NULL if there is no matching parameter n.
*/
struct aop_dynval *
-aop_capture_param_by_type (struct aop_joinpoint *jp, int n,
- const struct aop_type *type)
+aop_capture_call_param_by_type (struct aop_joinpoint *jp, int n,
+ const struct aop_type *type)
{
struct aop_pointcut *pc;
struct aop_dynval *dv;
* fuction. Be careful not to capture the <code>in_param</code> of
* the current function when you actually intend to capture the
* <code>call_param</code> being passed to a function call join point.
- * (For the latter, use aop_capture_param() instead).
+ * (For the latter, use aop_capture_call_param() instead).
*
* Note that you must use aop_filter_by_in_param() to filter a
* pointcut by parameter type for any parameter you wish to capture
extern struct aop_dynval *aop_capture_return_value (struct aop_joinpoint *jp);
extern struct aop_dynval *aop_capture_return_value_by_type (
struct aop_joinpoint *jp, const struct aop_type *type);
-extern struct aop_dynval *aop_capture_param (struct aop_joinpoint *jp,
- int param_index);
-extern struct aop_dynval *aop_capture_param_by_type (
+extern struct aop_dynval *aop_capture_call_param (struct aop_joinpoint *jp,
+ int param_index);
+extern struct aop_dynval *aop_capture_call_param_by_type (
struct aop_joinpoint *jp, int n, const struct aop_type *type);
extern struct aop_pointcut *aop_match_assignment_by_type (
struct aop_dynval *n;
name = aop_capture_called_function_name(jp);
- n = aop_capture_param(jp, 0);
+ n = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
}
struct aop_dynval *n;
name = aop_capture_called_function_name(jp);
- n = aop_capture_param(jp, 0);
+ n = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
}
called = aop_capture_called_function_name(jp);
if (called == NULL || *called != '_') {
- p = aop_capture_param(jp, 0);
+ p = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(called), AOP_DYNVAL(p), AOP_TERM_ARG);
}
}
{
struct aop_dynval *n;
- n = aop_capture_param(jp, 1);
+ n = aop_capture_call_param(jp, 1);
aop_insert_advice(jp, "_advice_foo", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
}
{
struct aop_dynval *n;
- n = aop_capture_param(jp, 0);
+ n = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, "_advice_hook_bad", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
}
{
struct aop_dynval *n;
- n = aop_capture_param(jp, 0);
+ n = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, "_advice_hook_good", AOP_INSERT_BEFORE, AOP_DYNVAL(n), AOP_TERM_ARG);
}
struct aop_dynval *n;
name = aop_capture_called_function_name(jp);
- n = aop_capture_param(jp, 0);
+ n = aop_capture_call_param(jp, 0);
aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_STR_CST(name), AOP_DYNVAL(n), AOP_DYNVAL(n), AOP_TERM_ARG);
}
struct aop_dynval *format;
struct aop_dynval *int_arg;
- format = aop_capture_param(jp, 0);
- int_arg = aop_capture_param_by_type(jp, 1, aop_t_all_signed());
+ format = aop_capture_call_param(jp, 0);
+ int_arg = aop_capture_call_param_by_type(jp, 1, aop_t_all_signed());
if (int_arg == NULL) {
/* Second argument is not a signed integer. */