aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/data.c b/src/data.c
index ac6c7af9d3c..a93cd169bf5 100644
--- a/src/data.c
+++ b/src/data.c
@@ -83,8 +83,8 @@ Lisp_Object Qoverflow_error, Qunderflow_error;
83Lisp_Object Qfloatp; 83Lisp_Object Qfloatp;
84Lisp_Object Qnumberp, Qnumber_or_marker_p; 84Lisp_Object Qnumberp, Qnumber_or_marker_p;
85 85
86Lisp_Object Qinteger, Qinterval, Qfloat, Qvector; 86Lisp_Object Qinteger, Qsymbol;
87Lisp_Object Qsymbol, Qstring, Qcons, Qmisc; 87static Lisp_Object Qcons, Qfloat, Qmisc, Qstring, Qvector;
88Lisp_Object Qwindow; 88Lisp_Object Qwindow;
89static Lisp_Object Qoverlay, Qwindow_configuration; 89static Lisp_Object Qoverlay, Qwindow_configuration;
90static Lisp_Object Qprocess, Qmarker; 90static Lisp_Object Qprocess, Qmarker;
@@ -1117,10 +1117,10 @@ DEFUN ("set", Fset, Sset, 2, 2, 0,
1117 return newval; 1117 return newval;
1118} 1118}
1119 1119
1120/* Return 1 if SYMBOL currently has a let-binding 1120/* Return true if SYMBOL currently has a let-binding
1121 which was made in the buffer that is now current. */ 1121 which was made in the buffer that is now current. */
1122 1122
1123static int 1123static bool
1124let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) 1124let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol)
1125{ 1125{
1126 struct specbinding *p; 1126 struct specbinding *p;
@@ -1139,7 +1139,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol)
1139 return 0; 1139 return 0;
1140} 1140}
1141 1141
1142static int 1142static bool
1143let_shadows_global_binding_p (Lisp_Object symbol) 1143let_shadows_global_binding_p (Lisp_Object symbol)
1144{ 1144{
1145 struct specbinding *p; 1145 struct specbinding *p;
@@ -1155,14 +1155,15 @@ let_shadows_global_binding_p (Lisp_Object symbol)
1155 If buffer/frame-locality is an issue, WHERE specifies which context to use. 1155 If buffer/frame-locality is an issue, WHERE specifies which context to use.
1156 (nil stands for the current buffer/frame). 1156 (nil stands for the current buffer/frame).
1157 1157
1158 If BINDFLAG is zero, then if this symbol is supposed to become 1158 If BINDFLAG is false, then if this symbol is supposed to become
1159 local in every buffer where it is set, then we make it local. 1159 local in every buffer where it is set, then we make it local.
1160 If BINDFLAG is nonzero, we don't do that. */ 1160 If BINDFLAG is true, we don't do that. */
1161 1161
1162void 1162void
1163set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag) 1163set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
1164 bool bindflag)
1164{ 1165{
1165 int voide = EQ (newval, Qunbound); 1166 bool voide = EQ (newval, Qunbound);
1166 struct Lisp_Symbol *sym; 1167 struct Lisp_Symbol *sym;
1167 Lisp_Object tem1; 1168 Lisp_Object tem1;
1168 1169
@@ -1501,7 +1502,8 @@ union Lisp_Val_Fwd
1501 }; 1502 };
1502 1503
1503static struct Lisp_Buffer_Local_Value * 1504static struct Lisp_Buffer_Local_Value *
1504make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents) 1505make_blv (struct Lisp_Symbol *sym, bool forwarded,
1506 union Lisp_Val_Fwd valcontents)
1505{ 1507{
1506 struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv); 1508 struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv);
1507 Lisp_Object symbol; 1509 Lisp_Object symbol;
@@ -1545,7 +1547,7 @@ The function `default-value' gets the default value and `set-default' sets it.
1545 struct Lisp_Symbol *sym; 1547 struct Lisp_Symbol *sym;
1546 struct Lisp_Buffer_Local_Value *blv = NULL; 1548 struct Lisp_Buffer_Local_Value *blv = NULL;
1547 union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); 1549 union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO});
1548 int forwarded IF_LINT (= 0); 1550 bool forwarded IF_LINT (= 0);
1549 1551
1550 CHECK_SYMBOL (variable); 1552 CHECK_SYMBOL (variable);
1551 sym = XSYMBOL (variable); 1553 sym = XSYMBOL (variable);
@@ -1617,10 +1619,10 @@ See also `make-variable-buffer-local'.
1617 1619
1618Do not use `make-local-variable' to make a hook variable buffer-local. 1620Do not use `make-local-variable' to make a hook variable buffer-local.
1619Instead, use `add-hook' and specify t for the LOCAL argument. */) 1621Instead, use `add-hook' and specify t for the LOCAL argument. */)
1620 (register Lisp_Object variable) 1622 (Lisp_Object variable)
1621{ 1623{
1622 register Lisp_Object tem; 1624 Lisp_Object tem;
1623 int forwarded IF_LINT (= 0); 1625 bool forwarded IF_LINT (= 0);
1624 union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); 1626 union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO});
1625 struct Lisp_Symbol *sym; 1627 struct Lisp_Symbol *sym;
1626 struct Lisp_Buffer_Local_Value *blv = NULL; 1628 struct Lisp_Buffer_Local_Value *blv = NULL;
@@ -1804,9 +1806,9 @@ is to set the VARIABLE frame parameter of that frame. See
1804Note that since Emacs 23.1, variables cannot be both buffer-local and 1806Note that since Emacs 23.1, variables cannot be both buffer-local and
1805frame-local any more (buffer-local bindings used to take precedence over 1807frame-local any more (buffer-local bindings used to take precedence over
1806frame-local bindings). */) 1808frame-local bindings). */)
1807 (register Lisp_Object variable) 1809 (Lisp_Object variable)
1808{ 1810{
1809 int forwarded; 1811 bool forwarded;
1810 union Lisp_Val_Fwd valcontents; 1812 union Lisp_Val_Fwd valcontents;
1811 struct Lisp_Symbol *sym; 1813 struct Lisp_Symbol *sym;
1812 struct Lisp_Buffer_Local_Value *blv = NULL; 1814 struct Lisp_Buffer_Local_Value *blv = NULL;
@@ -2262,7 +2264,7 @@ static Lisp_Object
2262arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) 2264arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison)
2263{ 2265{
2264 double f1 = 0, f2 = 0; 2266 double f1 = 0, f2 = 0;
2265 int floatp = 0; 2267 bool floatp = 0;
2266 2268
2267 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); 2269 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1);
2268 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); 2270 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2);
@@ -2379,7 +2381,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0,
2379uintmax_t 2381uintmax_t
2380cons_to_unsigned (Lisp_Object c, uintmax_t max) 2382cons_to_unsigned (Lisp_Object c, uintmax_t max)
2381{ 2383{
2382 int valid = 0; 2384 bool valid = 0;
2383 uintmax_t val IF_LINT (= 0); 2385 uintmax_t val IF_LINT (= 0);
2384 if (INTEGERP (c)) 2386 if (INTEGERP (c))
2385 { 2387 {
@@ -2432,7 +2434,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
2432intmax_t 2434intmax_t
2433cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) 2435cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
2434{ 2436{
2435 int valid = 0; 2437 bool valid = 0;
2436 intmax_t val IF_LINT (= 0); 2438 intmax_t val IF_LINT (= 0);
2437 if (INTEGERP (c)) 2439 if (INTEGERP (c))
2438 { 2440 {
@@ -2550,14 +2552,11 @@ static Lisp_Object float_arith_driver (double, ptrdiff_t, enum arithop,
2550static Lisp_Object 2552static Lisp_Object
2551arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) 2553arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2552{ 2554{
2553 register Lisp_Object val; 2555 Lisp_Object val;
2554 ptrdiff_t argnum; 2556 ptrdiff_t argnum, ok_args;
2555 register EMACS_INT accum = 0; 2557 EMACS_INT accum = 0;
2556 register EMACS_INT next; 2558 EMACS_INT next, ok_accum;
2557 2559 bool overflow = 0;
2558 int overflow = 0;
2559 ptrdiff_t ok_args;
2560 EMACS_INT ok_accum;
2561 2560
2562 switch (code) 2561 switch (code)
2563 { 2562 {
@@ -3130,8 +3129,6 @@ syms_of_data (void)
3130 DEFSYM (Qthread, "thread"); 3129 DEFSYM (Qthread, "thread");
3131 DEFSYM (Qmutex, "mutex"); 3130 DEFSYM (Qmutex, "mutex");
3132 DEFSYM (Qcondition_variable, "condition-variable"); 3131 DEFSYM (Qcondition_variable, "condition-variable");
3133 /* Used by Fgarbage_collect. */
3134 DEFSYM (Qinterval, "interval");
3135 DEFSYM (Qmisc, "misc"); 3132 DEFSYM (Qmisc, "misc");
3136 3133
3137 DEFSYM (Qdefun, "defun"); 3134 DEFSYM (Qdefun, "defun");