summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-08-01 12:49:28 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-08-01 12:49:28 +0400
commitd8a05828fd9f78c6cadddd8b47b53d83833c3917 (patch)
treee79a8e7e0a0abc277d5f928835abb0b64d7dcae7 /admin
parent015a2738eb575f9dc07ea5e589eb88c8e071930a (diff)
downloademacs-d8a05828fd9f78c6cadddd8b47b53d83833c3917.tar.gz
Use INTERNAL_FIELD for conses and overlays.
* src/lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD. Remove obsolete comment. (MVAR): New macro. (struct Lisp_Overlay): Use INTERNAL_FIELD. * src/alloc.c, src/buffer.c, src/buffer.h, src/fns.c: Adjust users. * admin/coccinelle/overlay.cocci: Semantic patch to replace direct access to Lisp_Object members of struct Lisp_Overlay to MVAR.
Diffstat (limited to 'admin')
-rw-r--r--admin/ChangeLog5
-rw-r--r--admin/coccinelle/overlay.cocci28
2 files changed, 33 insertions, 0 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 8ca17e58b30..54ac7b4edd7 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,5 +1,10 @@
2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
+ * coccinelle/overlay.cocci: Semantic patch to replace direct
+ access to Lisp_Object members of struct Lisp_Overlay to MVAR.
+
+2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
+
* coccinelle/symbol.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct Lisp_Symbol to SVAR.
diff --git a/admin/coccinelle/overlay.cocci b/admin/coccinelle/overlay.cocci
new file mode 100644
index 00000000000..2be141e8332
--- /dev/null
+++ b/admin/coccinelle/overlay.cocci
@@ -0,0 +1,28 @@
+// Change direct access to Lisp_Object fields of struct
+// Lisp_Overlay to MVAR. Beginning M denotes "misc", and
+// MVAR is likely to be used for other second-class objects.
+@@
+struct Lisp_Overlay *V;
+Lisp_Object O;
+@@
+(
+- V->start
++ MVAR (V, start)
+|
+- V->end
++ MVAR (V, end)
+|
+- V->plist
++ MVAR (V, plist)
+
+|
+
+- XOVERLAY (O)->start
++ MVAR (XOVERLAY (O), start)
+|
+- XOVERLAY (O)->end
++ MVAR (XOVERLAY (O), end)
+|
+- XOVERLAY (O)->plist
++ MVAR (XOVERLAY (O), plist)
+)