Mercurial > hg > xemacs-beta
comparison src/number.h @ 4888:c27efc9acb5a
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 27 Jan 2010 00:37:59 -0600 |
parents | 6772ce4d982b |
children | db2db229ee82 |
comparison
equal
deleted
inserted
replaced
4887:a47abe9c47f2 | 4888:c27efc9acb5a |
---|---|
336 enum number_type {FIXNUM_T, BIGNUM_T, RATIO_T, FLOAT_T, BIGFLOAT_T}; | 336 enum number_type {FIXNUM_T, BIGNUM_T, RATIO_T, FLOAT_T, BIGFLOAT_T}; |
337 | 337 |
338 extern enum number_type get_number_type (Lisp_Object); | 338 extern enum number_type get_number_type (Lisp_Object); |
339 extern enum number_type promote_args (Lisp_Object *, Lisp_Object *); | 339 extern enum number_type promote_args (Lisp_Object *, Lisp_Object *); |
340 | 340 |
341 #ifdef WITH_NUMBER_TYPES | |
342 DECLARE_INLINE_HEADER ( | |
343 int | |
344 non_fixnum_number_p (Lisp_Object object)) | |
345 { | |
346 if (LRECORDP (object)) | |
347 { | |
348 switch (XRECORD_LHEADER (object)->type) | |
349 { | |
350 case lrecord_type_float: | |
351 #ifdef HAVE_BIGNUM | |
352 case lrecord_type_bignum: | |
353 #endif | |
354 #ifdef HAVE_RATIO | |
355 case lrecord_type_ratio: | |
356 #endif | |
357 #ifdef HAVE_BIGFLOAT | |
358 case lrecord_type_bigfloat: | |
359 #endif | |
360 return 1; | |
361 } | |
362 } | |
363 return 0; | |
364 } | |
365 #define NON_FIXNUM_NUMBER_P(X) non_fixnum_number_p (X) | |
366 | |
367 #else | |
368 #define NON_FIXNUM_NUMBER_P FLOATP | |
369 #endif | |
370 | |
371 | |
341 #endif /* INCLUDED_number_h_ */ | 372 #endif /* INCLUDED_number_h_ */ |