HCoop
/
bpt
/
emacs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
declare smobs in alloc.c
[bpt/emacs.git]
/
admin
/
coccinelle
/
vector_contents.cocci
1
// Avoid direct access to `contents' member of
2
// Lisp_Vector, use AREF and ASET where possible.
3
@expression@
4
identifier I1, I2;
5
expression E1, E2;
6
@@
7
(
8
- XVECTOR (I1)->contents[I2++] = E1
9
+ ASET (I1, I2, E1), I2++
10
|
11
- XVECTOR (I1)->contents[E1] = E2
12
+ ASET (I1, E1, E2)
13
|
14
- XVECTOR (I1)->contents[E1]
15
+ AREF (I1, E1)
16
)