@dec@ identifier I; @@ mach_port_t I; @ptrdec@ identifier I; @@ mach_port_t *I; @ptrarg@ identifier F, I; @@ F (..., mach_port_t *I, ...) { ... } @@ identifier dec.I; expression E; @@ { <... -I = E +I = portseal_set_port (&I, E) ...> } /* The wrap hacks. */ /* ... with return values. */ @@ identifier R, dec.I; identifier F !~ "^portseal_"; position p; @@ R = F@p(..., - &I + PORTSEAL_WRAP_HACK_R (&I) , ...) @@ identifier R, ptrdec.I; identifier F !~ "^portseal_"; position p; @@ R = F@p(..., - I + PORTSEAL_WRAP_HACK_R (I) , ...) /* ... without return values. */ @@ identifier dec.I; identifier F !~ "^portseal_"; position p; @@ F@p(..., - &I + PORTSEAL_WRAP_HACK (&I) , ...); @@ identifier ptrdec.I; identifier F !~ "^portseal_"; position p; @@ F@p(..., - I + PORTSEAL_WRAP_HACK (I) , ...); @@ identifier F, I; expression E; @@ F (..., mach_port_t *I, ...) { <... - *I = E + *I = portseal_set_port (I, E) ...> } @@ identifier I; @@ { <... - mach_port_t I; + PORTSEAL_CLEANUP (mach_port_t, I, MACH_PORT_NULL); ...> } @@ identifier I; expression E; @@ { <... - mach_port_t I = E; + PORTSEAL_CLEANUP_I (mach_port_t, I, MACH_PORT_NULL, E); ...> } @@ expression E; @@ - malloc (E) + portseal_malloc (E) @@ expression E; @@ - free (E) + portseal_free (E)