Commit 3c9359df authored by Dmitry Antipov's avatar Dmitry Antipov

First Coccinelle semantic patch.

* coccinelle: New subdirectory
* coccinelle/README: Documentation stub.
* coccinelle/vector_contents.cocci: Semantic patch to replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
parent 772b2e2c
2012-06-24 Dmitry Antipov <dmantipov@yandex.ru>
First Coccinelle semantic patch.
* coccinelle: New subdirectory
* coccinelle/README: Documentation stub.
* coccinelle/vector_contents.cocci: Semantic patch to replace direct
access to `contents' member of Lisp_Vector objects with AREF and ASET
where appropriate.
2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
Support higher-resolution time stamps (Bug#9000).
......
This directory contains semantic patches for Coccinelle, a program matching
and transformation tool for programs written in C. For more details, see
http://coccinelle.lip6.fr.
// Avoid direct access to `contents' member of
// Lisp_Vector, use AREF and ASET where possible.
@expression@
identifier I1, I2;
expression E1, E2;
@@
(
- XVECTOR (I1)->contents[I2++] = E1
+ ASET (I1, I2, E1), I2++
|
- XVECTOR (I1)->contents[E1] = E2
+ ASET (I1, E1, E2)
|
-XVECTOR (I1)->contents[E1]
+AREF (I1, E1)
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment