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
* lisp/progmodes/ruby-mode.el (ruby-mode-variables): Don't set syntax
[emacs.git]
/
admin
/
coccinelle
/
vector_contents.cocci
blob
3c696ffd2374c12c41b3fa472c584ab1f785f1e2
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
)