Mercurial > emacs
diff src/lisp.h @ 621:eca8812e61cd
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Fri, 24 Apr 1992 08:11:54 +0000 |
parents | ccadad491483 |
children | 40b255f55df3 |
line wrap: on
line diff
--- a/src/lisp.h Fri Apr 24 08:11:28 1992 +0000 +++ b/src/lisp.h Fri Apr 24 08:11:54 1992 +0000 @@ -1,11 +1,11 @@ /* Fundamental definitions for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) +the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -506,15 +506,19 @@ /* Data type checking */ -#ifdef NULL -#undef NULL +#define NILP(x) (XFASTINT (x) == XFASTINT (Qnil)) + +#ifdef LISP_FLOAT_TYPE +#define NUMBERP(x) (XTYPE (x) == Lisp_Int || XTYPE (x) == Lisp_Float) +#else +#define NUMBERP(x) (XTYPE (x) == Lisp_Int) #endif -#define NILP(x) (XFASTINT (x) == XFASTINT (Qnil)) /* #define LISTP(x) (XTYPE ((x)) == Lisp_Cons)*/ #define CONSP(x) (XTYPE ((x)) == Lisp_Cons) #define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) + #define CHECK_LIST(x, i) \ { if ((XTYPE ((x)) != Lisp_Cons) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); }