HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
permit multiline comments and strings in macros
[bpt/coccinelle.git]
/
demos
/
vm.cocci
1
// Options: -D alloc=kmalloc -D free=kfree
2
3
@r@
4
identifier virtual.alloc, virtual.free;
5
expression x;
6
position p1,p2;
7
@@
8
9
x = alloc@p1(...);
10
...
11
free@p2(x);
12
13
@script:python@
14
p1 << r.p1;
15
p2 << r.p2;
16
alloc << virtual.alloc;
17
@@
18
cocci.print_main(alloc,p1);
19
cocci.print_secs("free",p2);