comparison src/data.c @ 9954:18b408b05189

(syms_of_data): Set Qwholenump as function, not variable. (Fnatnump): Use NATNUMP macro.
author Karl Heuer <kwzh@gnu.org>
date Wed, 16 Nov 1994 00:42:11 +0000
parents 924f7b9ce544
children d64bdd958254
comparison
equal deleted inserted replaced
9953:e0672d4cf470 9954:18b408b05189
327 DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, 327 DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0,
328 "T if OBJECT is a nonnegative integer.") 328 "T if OBJECT is a nonnegative integer.")
329 (obj) 329 (obj)
330 Lisp_Object obj; 330 Lisp_Object obj;
331 { 331 {
332 if (INTEGERP (obj) && XINT (obj) >= 0) 332 if (NATNUMP (obj))
333 return Qt; 333 return Qt;
334 return Qnil; 334 return Qnil;
335 } 335 }
336 336
337 DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, 337 DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
2343 defsubr (&Sash); 2343 defsubr (&Sash);
2344 defsubr (&Sadd1); 2344 defsubr (&Sadd1);
2345 defsubr (&Ssub1); 2345 defsubr (&Ssub1);
2346 defsubr (&Slognot); 2346 defsubr (&Slognot);
2347 2347
2348 Fset (Qwholenump, Qnatnump); 2348 XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function;
2349 } 2349 }
2350 2350
2351 SIGTYPE 2351 SIGTYPE
2352 arith_error (signo) 2352 arith_error (signo)
2353 int signo; 2353 int signo;