comparison src/lread.c @ 9913:c921977bb0ce

(defvar_int, defvar_bool, defvar_lisp_nopro, defvar_per_buffer): Use accessor macros.
author Karl Heuer <kwzh@gnu.org>
date Mon, 14 Nov 1994 22:16:52 +0000
parents e91d69642eab
children 6ed7a5e79c20
comparison
equal deleted inserted replaced
9912:08d268f33d66 9913:c921977bb0ce
1777 { 1777 {
1778 Lisp_Object sym, val; 1778 Lisp_Object sym, val;
1779 sym = intern (namestring); 1779 sym = intern (namestring);
1780 val = allocate_misc (); 1780 val = allocate_misc ();
1781 XMISC (val)->type = Lisp_Misc_Intfwd; 1781 XMISC (val)->type = Lisp_Misc_Intfwd;
1782 XMISC (val)->u_intfwd.intvar = address; 1782 XINTFWD (val)->intvar = address;
1783 XSYMBOL (sym)->value = val; 1783 XSYMBOL (sym)->value = val;
1784 } 1784 }
1785 1785
1786 /* Similar but define a variable whose value is T if address contains 1, 1786 /* Similar but define a variable whose value is T if address contains 1,
1787 NIL if address contains 0 */ 1787 NIL if address contains 0 */
1792 { 1792 {
1793 Lisp_Object sym, val; 1793 Lisp_Object sym, val;
1794 sym = intern (namestring); 1794 sym = intern (namestring);
1795 val = allocate_misc (); 1795 val = allocate_misc ();
1796 XMISC (val)->type = Lisp_Misc_Boolfwd; 1796 XMISC (val)->type = Lisp_Misc_Boolfwd;
1797 XMISC (val)->u_boolfwd.boolvar = address; 1797 XBOOLFWD (val)->boolvar = address;
1798 XSYMBOL (sym)->value = val; 1798 XSYMBOL (sym)->value = val;
1799 } 1799 }
1800 1800
1801 /* Similar but define a variable whose value is the Lisp Object stored 1801 /* Similar but define a variable whose value is the Lisp Object stored
1802 at address. Two versions: with and without gc-marking of the C 1802 at address. Two versions: with and without gc-marking of the C
1810 { 1810 {
1811 Lisp_Object sym, val; 1811 Lisp_Object sym, val;
1812 sym = intern (namestring); 1812 sym = intern (namestring);
1813 val = allocate_misc (); 1813 val = allocate_misc ();
1814 XMISC (val)->type = Lisp_Misc_Objfwd; 1814 XMISC (val)->type = Lisp_Misc_Objfwd;
1815 XMISC (val)->u_objfwd.objvar = address; 1815 XOBJFWD (val)->objvar = address;
1816 XSYMBOL (sym)->value = val; 1816 XSYMBOL (sym)->value = val;
1817 } 1817 }
1818 1818
1819 void 1819 void
1820 defvar_lisp (namestring, address) 1820 defvar_lisp (namestring, address)
1845 sym = intern (namestring); 1845 sym = intern (namestring);
1846 val = allocate_misc (); 1846 val = allocate_misc ();
1847 offset = (char *)address - (char *)current_buffer; 1847 offset = (char *)address - (char *)current_buffer;
1848 1848
1849 XMISC (val)->type = Lisp_Misc_Buffer_Objfwd; 1849 XMISC (val)->type = Lisp_Misc_Buffer_Objfwd;
1850 XMISC (val)->u_buffer_objfwd.offset = offset; 1850 XBUFFER_OBJFWD (val)->offset = offset;
1851 XSYMBOL (sym)->value = val; 1851 XSYMBOL (sym)->value = val;
1852 *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym; 1852 *(Lisp_Object *)(offset + (char *)&buffer_local_symbols) = sym;
1853 *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type; 1853 *(Lisp_Object *)(offset + (char *)&buffer_local_types) = type;
1854 if (XINT (*(Lisp_Object *)(offset + (char *)&buffer_local_flags)) == 0) 1854 if (XINT (*(Lisp_Object *)(offset + (char *)&buffer_local_flags)) == 0)
1855 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding 1855 /* Did a DEFVAR_PER_BUFFER without initializing the corresponding