Commit 077ed037 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

cocci: Help spatch operate on VMODs

Successfully tested with a dummy semantic patch:

    @@
    idexpression ctx, caller;
    @@

    -CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
    +AN(ctx);
     CHECK_OBJ_NOTNULL(caller, DEBUG_CALLER_MAGIC);
    -AN(caller->sub);
    +assert(caller->sub);

I decided to cram all definitions in the existing vdef.h file to keep
our relatively simple setup. We can add more macros as we learn what
coccinelle trips over.

Refs f5b0b201
parent 5a39e0cd
/* vdef.h */
#define v_printflike_(f,a)
#define v_deprecated_
#define v_dont_optimize
#define v_matchproto_(xxx)
#define v_statevariable_(varname)
#define v_unused_
/* vrt.h */
#define VRT_CTX const struct vrt_ctx *ctx
/* vcc_if.h */
#define VPFX(a) vmod_##a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment