diff options
| author | Dmitry Antipov | 2012-08-01 10:23:24 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-01 10:23:24 +0400 |
| commit | 3193acd258557340907a7281d067fdbb426c2f54 (patch) | |
| tree | 533f741701969dc6dcb6111ed3c64549fbc0c79a /admin | |
| parent | 3a45383a47009a5e6a15a4005ad95ecf63539182 (diff) | |
| download | emacs-3193acd258557340907a7281d067fdbb426c2f54.tar.gz emacs-3193acd258557340907a7281d067fdbb426c2f54.zip | |
Use INTERNAL_FIELD for processes.
* src/process.h (PVAR): New macro. Adjust style.
(struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
* src/print.c, src/process.c, src/sysdep.c, src/w32.c:
* src/xdisp.c: Users changed.
* admin/coccinelle/process.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct Lisp_Process to PVAR.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 5 | ||||
| -rw-r--r-- | admin/coccinelle/process.cocci | 110 |
2 files changed, 115 insertions, 0 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 0837552867b..656c1a0fafa 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | * coccinelle/process.cocci: Semantic patch to replace direct | ||
| 4 | access to Lisp_Object members of struct Lisp_Process to PVAR. | ||
| 5 | |||
| 6 | 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 7 | |||
| 3 | * coccinelle/window.cocci: Semantic patch to replace direct | 8 | * coccinelle/window.cocci: Semantic patch to replace direct |
| 4 | access to Lisp_Object members of struct window to WVAR. | 9 | access to Lisp_Object members of struct window to WVAR. |
| 5 | 10 | ||
diff --git a/admin/coccinelle/process.cocci b/admin/coccinelle/process.cocci new file mode 100644 index 00000000000..bf295ab7b6f --- /dev/null +++ b/admin/coccinelle/process.cocci | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | // Change direct access to Lisp_Object fields of struct Lisp_Process to PVAR. | ||
| 2 | @@ | ||
| 3 | struct Lisp_Process *P; | ||
| 4 | Lisp_Object O; | ||
| 5 | @@ | ||
| 6 | ( | ||
| 7 | - P->tty_name | ||
| 8 | + PVAR (P, tty_name) | ||
| 9 | | | ||
| 10 | - P->name | ||
| 11 | + PVAR (P, name) | ||
| 12 | | | ||
| 13 | - P->command | ||
| 14 | + PVAR (P, command) | ||
| 15 | | | ||
| 16 | - P->filter | ||
| 17 | + PVAR (P, filter) | ||
| 18 | | | ||
| 19 | - P->sentinel | ||
| 20 | + PVAR (P, sentinel) | ||
| 21 | | | ||
| 22 | - P->log | ||
| 23 | + PVAR (P, log) | ||
| 24 | | | ||
| 25 | - P->buffer | ||
| 26 | + PVAR (P, buffer) | ||
| 27 | | | ||
| 28 | - P->childp | ||
| 29 | + PVAR (P, childp) | ||
| 30 | | | ||
| 31 | - P->plist | ||
| 32 | + PVAR (P, plist) | ||
| 33 | | | ||
| 34 | - P->type | ||
| 35 | + PVAR (P, type) | ||
| 36 | | | ||
| 37 | - P->mark | ||
| 38 | + PVAR (P, mark) | ||
| 39 | | | ||
| 40 | - P->status | ||
| 41 | + PVAR (P, status) | ||
| 42 | | | ||
| 43 | - P->decode_coding_system | ||
| 44 | + PVAR (P, decode_coding_system) | ||
| 45 | | | ||
| 46 | - P->decoding_buf | ||
| 47 | + PVAR (P, decoding_buf) | ||
| 48 | | | ||
| 49 | - P->encode_coding_system | ||
| 50 | + PVAR (P, encode_coding_system) | ||
| 51 | | | ||
| 52 | - P->encoding_buf | ||
| 53 | + PVAR (P, encoding_buf) | ||
| 54 | | | ||
| 55 | - P->write_queue | ||
| 56 | + PVAR (P, write_queue) | ||
| 57 | |||
| 58 | | | ||
| 59 | |||
| 60 | - XPROCESS (O)->tty_name | ||
| 61 | + PVAR (XPROCESS (O), tty_name) | ||
| 62 | | | ||
| 63 | - XPROCESS (O)->name | ||
| 64 | + PVAR (XPROCESS (O), name) | ||
| 65 | | | ||
| 66 | - XPROCESS (O)->command | ||
| 67 | + PVAR (XPROCESS (O), command) | ||
| 68 | | | ||
| 69 | - XPROCESS (O)->filter | ||
| 70 | + PVAR (XPROCESS (O), filter) | ||
| 71 | | | ||
| 72 | - XPROCESS (O)->sentinel | ||
| 73 | + PVAR (XPROCESS (O), sentinel) | ||
| 74 | | | ||
| 75 | - XPROCESS (O)->log | ||
| 76 | + PVAR (XPROCESS (O), log) | ||
| 77 | | | ||
| 78 | - XPROCESS (O)->buffer | ||
| 79 | + PVAR (XPROCESS (O), buffer) | ||
| 80 | | | ||
| 81 | - XPROCESS (O)->childp | ||
| 82 | + PVAR (XPROCESS (O), childp) | ||
| 83 | | | ||
| 84 | - XPROCESS (O)->plist | ||
| 85 | + PVAR (XPROCESS (O), plist) | ||
| 86 | | | ||
| 87 | - XPROCESS (O)->type | ||
| 88 | + PVAR (XPROCESS (O), type) | ||
| 89 | | | ||
| 90 | - XPROCESS (O)->mark | ||
| 91 | + PVAR (XPROCESS (O), mark) | ||
| 92 | | | ||
| 93 | - XPROCESS (O)->status | ||
| 94 | + PVAR (XPROCESS (O), status) | ||
| 95 | | | ||
| 96 | - XPROCESS (O)->decode_coding_system | ||
| 97 | + PVAR (XPROCESS (O), decode_coding_system) | ||
| 98 | | | ||
| 99 | - XPROCESS (O)->decoding_buf | ||
| 100 | + PVAR (XPROCESS (O), decoding_buf) | ||
| 101 | | | ||
| 102 | - XPROCESS (O)->encode_coding_system | ||
| 103 | + PVAR (XPROCESS (O), encode_coding_system) | ||
| 104 | | | ||
| 105 | - XPROCESS (O)->encoding_buf | ||
| 106 | + PVAR (XPROCESS (O), encoding_buf) | ||
| 107 | | | ||
| 108 | - XPROCESS (O)->write_queue | ||
| 109 | + PVAR (XPROCESS (O), write_queue) | ||
| 110 | ) | ||