diff options
| author | Karl Heuer | 1994-10-04 12:17:56 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-10-04 12:17:56 +0000 |
| commit | 1805de4f1ac7394184985e58dc90b68dc55197a6 (patch) | |
| tree | d652333219e68c72abcd3cca25f2b4612d457e71 /src | |
| parent | bff4ec1f9c4b2718849ad41a9404e5cfc68694a9 (diff) | |
| download | emacs-1805de4f1ac7394184985e58dc90b68dc55197a6.tar.gz emacs-1805de4f1ac7394184985e58dc90b68dc55197a6.zip | |
(Fget_file_char, Fload, read1, oblookup, map_obarray, defsubr, defalias,
defvar_int, defvar_bool, defvar_lisp, defvar_lisp_nopro, defvar_per_buffer):
Use new accessor macros instead of calling XSET directly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lread.c b/src/lread.c index ac0fed9022e..b8cf3bca4d9 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -324,7 +324,7 @@ DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, | |||
| 324 | () | 324 | () |
| 325 | { | 325 | { |
| 326 | register Lisp_Object val; | 326 | register Lisp_Object val; |
| 327 | XSET (val, Lisp_Int, getc (instream)); | 327 | XSETINT (val, getc (instream)); |
| 328 | return val; | 328 | return val; |
| 329 | } | 329 | } |
| 330 | 330 | ||
| @@ -434,7 +434,7 @@ Return t if file exists.") | |||
| 434 | So malloc a full-size pointer, and record the address of that pointer. */ | 434 | So malloc a full-size pointer, and record the address of that pointer. */ |
| 435 | ptr = (FILE **) xmalloc (sizeof (FILE *)); | 435 | ptr = (FILE **) xmalloc (sizeof (FILE *)); |
| 436 | *ptr = stream; | 436 | *ptr = stream; |
| 437 | XSET (lispstream, Lisp_Internal_Stream, (EMACS_INT) ptr); | 437 | XSETINTERNAL_STREAM (lispstream, (EMACS_INT) ptr); |
| 438 | record_unwind_protect (load_unwind, lispstream); | 438 | record_unwind_protect (load_unwind, lispstream); |
| 439 | record_unwind_protect (load_descriptor_unwind, load_descriptor_list); | 439 | record_unwind_protect (load_descriptor_unwind, load_descriptor_list); |
| 440 | load_descriptor_list | 440 | load_descriptor_list |
| @@ -1129,7 +1129,7 @@ read1 (readcharfun) | |||
| 1129 | case ']': | 1129 | case ']': |
| 1130 | { | 1130 | { |
| 1131 | register Lisp_Object val; | 1131 | register Lisp_Object val; |
| 1132 | XSET (val, Lisp_Internal, c); | 1132 | XSETINTERNAL (val, c); |
| 1133 | return val; | 1133 | return val; |
| 1134 | } | 1134 | } |
| 1135 | 1135 | ||
| @@ -1202,9 +1202,9 @@ read1 (readcharfun) | |||
| 1202 | if (c < 0) return Fsignal (Qend_of_file, Qnil); | 1202 | if (c < 0) return Fsignal (Qend_of_file, Qnil); |
| 1203 | 1203 | ||
| 1204 | if (c == '\\') | 1204 | if (c == '\\') |
| 1205 | XSET (val, Lisp_Int, read_escape (readcharfun)); | 1205 | XSETINT (val, read_escape (readcharfun)); |
| 1206 | else | 1206 | else |
| 1207 | XSET (val, Lisp_Int, c); | 1207 | XSETINT (val, c); |
| 1208 | 1208 | ||
| 1209 | return val; | 1209 | return val; |
| 1210 | } | 1210 | } |
| @@ -1277,7 +1277,7 @@ read1 (readcharfun) | |||
| 1277 | #endif | 1277 | #endif |
| 1278 | { | 1278 | { |
| 1279 | register Lisp_Object val; | 1279 | register Lisp_Object val; |
| 1280 | XSET (val, Lisp_Internal, c); | 1280 | XSETINTERNAL (val, c); |
| 1281 | return val; | 1281 | return val; |
| 1282 | } | 1282 | } |
| 1283 | 1283 | ||
| @@ -1354,7 +1354,7 @@ read1 (readcharfun) | |||
| 1354 | if (p1[-1] == '.') | 1354 | if (p1[-1] == '.') |
| 1355 | p1[-1] = '\0'; | 1355 | p1[-1] = '\0'; |
| 1356 | #endif | 1356 | #endif |
| 1357 | XSET (val, Lisp_Int, atoi (read_buffer)); | 1357 | XSETINT (val, atoi (read_buffer)); |
| 1358 | return val; | 1358 | return val; |
| 1359 | } | 1359 | } |
| 1360 | } | 1360 | } |
| @@ -1637,7 +1637,7 @@ oblookup (obarray, ptr, size) | |||
| 1637 | ; | 1637 | ; |
| 1638 | else if (!SYMBOLP (bucket)) | 1638 | else if (!SYMBOLP (bucket)) |
| 1639 | error ("Bad data in guts of obarray"); /* Like CADR error message */ | 1639 | error ("Bad data in guts of obarray"); /* Like CADR error message */ |
| 1640 | else for (tail = bucket; ; XSET (tail, Lisp_Symbol, XSYMBOL (tail)->next)) | 1640 | else for (tail = bucket; ; XSETSYMBOL (tail, XSYMBOL (tail)->next)) |
| 1641 | { | 1641 | { |
| 1642 | if (XSYMBOL (tail)->name->size == size && | 1642 | if (XSYMBOL (tail)->name->size == size && |
| 1643 | !bcmp (XSYMBOL (tail)->name->data, ptr, size)) | 1643 | !bcmp (XSYMBOL (tail)->name->data, ptr, size)) |
| @@ -1645,7 +1645,7 @@ oblookup (obarray, ptr, size) | |||
| 1645 | else if (XSYMBOL (tail)->next == 0) | 1645 | else if (XSYMBOL (tail)->next == 0) |
| 1646 | break; | 1646 | break; |
| 1647 | } | 1647 | } |
| 1648 | XSET (tem, Lisp_Int, hash); | 1648 | XSETINT (tem, hash); |
| 1649 | return tem; | 1649 | return tem; |
| 1650 | } | 1650 | } |
| 1651 | 1651 | ||
| @@ -1686,7 +1686,7 @@ map_obarray (obarray, fn, arg) | |||
| 1686 | (*fn) (tail, arg); | 1686 | (*fn) (tail, arg); |
| 1687 | if (XSYMBOL (tail)->next == 0) | 1687 | if (XSYMBOL (tail)->next == 0) |
| 1688 | break; | 1688 | break; |
| 1689 | XSET (tail, Lisp_Symbol, XSYMBOL (tail)->next); | 1689 | XSETSYMBOL (tail, XSYMBOL (tail)->next); |
| 1690 | } | 1690 | } |
| 1691 | } | 1691 | } |
| 1692 | } | 1692 | } |
| @@ -1760,7 +1760,7 @@ defsubr (sname) | |||
| 1760 | { | 1760 | { |
| 1761 | Lisp_Object sym; | 1761 | Lisp_Object sym; |
| 1762 | sym = intern (sname->symbol_name); | 1762 | sym = intern (sname->symbol_name); |
| 1763 | XSET (XSYMBOL (sym)->function, Lisp_Subr, sname); | 1763 | XSETSUBR (XSYMBOL (sym)->function, sname); |
| 1764 | } | 1764 | } |
| 1765 | 1765 | ||
| 1766 | #ifdef NOTDEF /* use fset in subr.el now */ | 1766 | #ifdef NOTDEF /* use fset in subr.el now */ |
| @@ -1771,7 +1771,7 @@ defalias (sname, string) | |||
| 1771 | { | 1771 | { |
| 1772 | Lisp_Object sym; | 1772 | Lisp_Object sym; |
| 1773 | sym = intern (string); | 1773 | sym = intern (string); |
| 1774 | XSET (XSYMBOL (sym)->function, Lisp_Subr, sname); | 1774 | XSETSUBR (XSYMBOL (sym)->function, sname); |
| 1775 | } | 1775 | } |
| 1776 | #endif /* NOTDEF */ | 1776 | #endif /* NOTDEF */ |
| 1777 | 1777 | ||
| @@ -1786,7 +1786,7 @@ defvar_int (namestring, address) | |||
| 1786 | { | 1786 | { |
| 1787 | Lisp_Object sym; | 1787 | Lisp_Object sym; |
| 1788 | sym = intern (namestring); | 1788 | sym = intern (namestring); |
| 1789 | XSET (XSYMBOL (sym)->value, Lisp_Intfwd, address); | 1789 | XSETINTFWD (XSYMBOL (sym)->value, address); |
| 1790 | } | 1790 | } |
| 1791 | 1791 | ||
| 1792 | /* Similar but define a variable whose value is T if address contains 1, | 1792 | /* Similar but define a variable whose value is T if address contains 1, |
| @@ -1799,7 +1799,7 @@ defvar_bool (namestring, address) | |||
| 1799 | { | 1799 | { |
| 1800 | Lisp_Object sym; | 1800 | Lisp_Object sym; |
| 1801 | sym = intern (namestring); | 1801 | sym = intern (namestring); |
| 1802 | XSET (XSYMBOL (sym)->value, Lisp_Boolfwd, address); | 1802 | XSETBOOLFWD (XSYMBOL (sym)->value, address); |
| 1803 | } | 1803 | } |
| 1804 | 1804 | ||
| 1805 | /* Similar but define a variable whose value is the Lisp Object stored at address. */ | 1805 | /* Similar but define a variable whose value is the Lisp Object stored at address. */ |
| @@ -1811,7 +1811,7 @@ defvar_lisp (namestring, address) | |||
| 1811 | { | 1811 | { |
| 1812 | Lisp_Object sym; | 1812 | Lisp_Object sym; |
| 1813 | sym = intern (namestring); | 1813 | sym = intern (namestring); |
| 1814 | XSET (XSYMBOL (sym)->value, Lisp_Objfwd, address); | 1814 | XSETOBJFWD (XSYMBOL (sym)->value, address); |
| 1815 | staticpro (address); | 1815 | staticpro (address); |
| 1816 | } | 1816 | } |
| 1817 | 1817 | ||
| @@ -1826,7 +1826,7 @@ defvar_lisp_nopro (namestring, address) | |||
| 1826 | { | 1826 | { |
| 1827 | Lisp_Object sym; | 1827 | Lisp_Object sym; |
| 1828 | sym = intern (namestring); | 1828 | sym = intern (namestring); |
| 1829 | XSET (XSYMBOL (sym)->value, Lisp_Objfwd, address); | 1829 | XSETOBJFWD (XSYMBOL (sym)->value, address); |
| 1830 | } | 1830 | } |
| 1831 | 1831 | ||
| 1832 | #ifndef standalone | 1832 | #ifndef standalone |
| @@ -1848,8 +1848,8 @@ defvar_per_buffer (namestring, address, type, doc) | |||
| 1848 | sym = intern (namestring); | 1848 | sym = intern (namestring); |
| 1849 | offset = (char *)address - (char *)current_buffer; | 1849 | offset = (char *)address - (char *)current_buffer; |
| 1850 | 1850 | ||
| 1851 | XSET (XSYMBOL (sym)->value, Lisp_Buffer_Objfwd, | 1851 | XSETBUFFER_OBJFWD (XSYMBOL (sym)->value, |
| 1852 | (Lisp_Object *) offset); | 1852 | (Lisp_Object *) offset); |
| 1853 | *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym; | 1853 | *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym; |
| 1854 | *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type; | 1854 | *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type; |
| 1855 | if (*(int *)(offset + (char *)&buffer_local_flags) == 0) | 1855 | if (*(int *)(offset + (char *)&buffer_local_flags) == 0) |