diff options
| author | Dmitry Antipov | 2012-08-01 11:57:09 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-01 11:57:09 +0400 |
| commit | 8271d59040b3d83fb3fc8cb23723538183b12ad4 (patch) | |
| tree | 909df79d98251334a8e2dc393d54ec47cc441756 /src/eval.c | |
| parent | 0d26d7c4dc79554439ad96fb7d9f75aa2085e0ca (diff) | |
| download | emacs-8271d59040b3d83fb3fc8cb23723538183b12ad4.tar.gz emacs-8271d59040b3d83fb3fc8cb23723538183b12ad4.zip | |
Use INTERNAL_FIELD for symbols.
* src/lisp.h (SVAR): New macro. Adjust users.
* src/alloc.c, src/bytecode.c, src/cmds.c, src/data.c, src/doc.c, src/eval.c:
* src/fns.c, src/keyboard.c, src/lread.c, src/xterm.c: Users changed.
* admin/coccinelle/symbol.cocci: Semantic patch to replace direct
access to Lisp_Object members of struct Lisp_Symbol to SVAR.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c index 391058d12c6..64f384f2ca9 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -976,7 +976,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. */) | |||
| 976 | tem = Fassq (sym, environment); | 976 | tem = Fassq (sym, environment); |
| 977 | if (NILP (tem)) | 977 | if (NILP (tem)) |
| 978 | { | 978 | { |
| 979 | def = XSYMBOL (sym)->function; | 979 | def = SVAR (XSYMBOL (sym), function); |
| 980 | if (!EQ (def, Qunbound)) | 980 | if (!EQ (def, Qunbound)) |
| 981 | continue; | 981 | continue; |
| 982 | } | 982 | } |
| @@ -1893,9 +1893,9 @@ this does nothing and returns nil. */) | |||
| 1893 | CHECK_STRING (file); | 1893 | CHECK_STRING (file); |
| 1894 | 1894 | ||
| 1895 | /* If function is defined and not as an autoload, don't override. */ | 1895 | /* If function is defined and not as an autoload, don't override. */ |
| 1896 | if (!EQ (XSYMBOL (function)->function, Qunbound) | 1896 | if (!EQ (SVAR (XSYMBOL (function), function), Qunbound) |
| 1897 | && !(CONSP (XSYMBOL (function)->function) | 1897 | && !(CONSP (SVAR (XSYMBOL (function), function)) |
| 1898 | && EQ (XCAR (XSYMBOL (function)->function), Qautoload))) | 1898 | && EQ (XCAR (SVAR (XSYMBOL (function), function)), Qautoload))) |
| 1899 | return Qnil; | 1899 | return Qnil; |
| 1900 | 1900 | ||
| 1901 | if (NILP (Vpurify_flag)) | 1901 | if (NILP (Vpurify_flag)) |
| @@ -2081,7 +2081,7 @@ eval_sub (Lisp_Object form) | |||
| 2081 | /* Optimize for no indirection. */ | 2081 | /* Optimize for no indirection. */ |
| 2082 | fun = original_fun; | 2082 | fun = original_fun; |
| 2083 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) | 2083 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) |
| 2084 | && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) | 2084 | && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) |
| 2085 | fun = indirect_function (fun); | 2085 | fun = indirect_function (fun); |
| 2086 | 2086 | ||
| 2087 | if (SUBRP (fun)) | 2087 | if (SUBRP (fun)) |
| @@ -2266,7 +2266,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */) | |||
| 2266 | 2266 | ||
| 2267 | /* Optimize for no indirection. */ | 2267 | /* Optimize for no indirection. */ |
| 2268 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) | 2268 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) |
| 2269 | && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) | 2269 | && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) |
| 2270 | fun = indirect_function (fun); | 2270 | fun = indirect_function (fun); |
| 2271 | if (EQ (fun, Qunbound)) | 2271 | if (EQ (fun, Qunbound)) |
| 2272 | { | 2272 | { |
| @@ -2771,7 +2771,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2771 | /* Optimize for no indirection. */ | 2771 | /* Optimize for no indirection. */ |
| 2772 | fun = original_fun; | 2772 | fun = original_fun; |
| 2773 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) | 2773 | if (SYMBOLP (fun) && !EQ (fun, Qunbound) |
| 2774 | && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) | 2774 | && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) |
| 2775 | fun = indirect_function (fun); | 2775 | fun = indirect_function (fun); |
| 2776 | 2776 | ||
| 2777 | if (SUBRP (fun)) | 2777 | if (SUBRP (fun)) |