repo.or.cz
/
emacs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Make sh-mode always use p-s-lookup-properties
[emacs.git]
/
admin
/
coccinelle
/
vector_contents.cocci
blob
10b01f2bbd458f8ac9c9997b90d06d9c4ac43744
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
)