summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-04-01 11:54:23 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-04-01 12:02:37 -0700
commit74b63d27a629db96b73a83f205d8a256911abc1c (patch)
tree2c2128596c370b9c05f5e80d7805137426d35be1 /lisp/emacs-lisp/cl.el
parent9287813da1ae9076f29be111674d1795bee66447 (diff)
downloademacs-74b63d27a629db96b73a83f205d8a256911abc1c.tar.gz
emacs-74b63d27a629db96b73a83f205d8a256911abc1c.tar.bz2
emacs-74b63d27a629db96b73a83f205d8a256911abc1c.zip
Make struct Lisp_Objfwd etc. objects read-only
Initialize these objects statically, and make them constants. This is a bit safer and more efficient. * src/data.c (XBOOLFWD, XKBOARD_OBJFWD, XFIXNUMFWD, XOBJFWD): * src/lisp.h (XBUFFER_OBJFWD): Return a pointer-to-const instead of an unrestricted pointer. (lispfwd): fwdptr is now a pointer-to-const instead of an unrestricted pointer. All uses changed. (SET_SYMBOL_FWD): Accept pointer-to-const instead of an unrestricted pointer. (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT) (DEFVAR_KBOARD): Initialize static structures statically instead of dynamically, and make them const. * src/lread.c (defvar_int, defvar_bool, defvar_lisp_nopro) (defvar_lisp, defvar_kboard): Accept pointer-to-const instead of an unrestricted pointer; it’s now the caller’s responsibility to initialize the pointed-to storage. No need for a separate address argument any more. All callers changed.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
0 files changed, 0 insertions, 0 deletions