X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ffloatfns.c;h=a0fd4273bcf40bb57a3b9f75aa3a0ce6d3876912;hb=4082f470d7c6075a5c04c1bdf6e9e3f27c9700d5;hp=56a78a4663c3b61399e30af4ebe8e6fbae3651d4;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git- diff --git a/src/floatfns.c b/src/floatfns.c index 56a78a4..a0fd427 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -179,9 +179,14 @@ float_hash (Lisp_Object obj, int depth) return (unsigned long) fmod (extract_float (obj), 4e9); } +static const struct lrecord_description float_description[] = { + { XD_END } +}; + DEFINE_BASIC_LRECORD_IMPLEMENTATION ("float", float, mark_float, print_float, 0, float_equal, - float_hash, struct Lisp_Float); + float_hash, float_description, + struct Lisp_Float); /* Extract a Lisp number as a `double', or signal an error. */ @@ -194,7 +199,7 @@ extract_float (Lisp_Object num) if (INTP (num)) return (double) XINT (num); - return extract_float (wrong_type_argument (num, Qnumberp)); + return extract_float (wrong_type_argument (Qnumberp, num)); } #endif /* LISP_FLOAT_TYPE */ @@ -666,12 +671,12 @@ Return the absolute value of ARG. if (INTP (arg)) return (XINT (arg) >= 0) ? arg : make_int (- XINT (arg)); - return Fabs (wrong_type_argument (arg, Qnumberp)); + return Fabs (wrong_type_argument (Qnumberp, arg)); } #ifdef LISP_FLOAT_TYPE DEFUN ("float", Ffloat, 1, 1, 0, /* -Return the floating point number equal to ARG. +Return the floating point number numerically equal to ARG. */ (arg)) { @@ -681,7 +686,7 @@ Return the floating point number equal to ARG. if (FLOATP (arg)) /* give 'em the same float back */ return arg; - return Ffloat (wrong_type_argument (arg, Qnumberp)); + return Ffloat (wrong_type_argument (Qnumberp, arg)); } #endif /* LISP_FLOAT_TYPE */ @@ -757,7 +762,7 @@ Return the smallest integer no less than ARG. (Round toward +inf.) if (INTP (arg)) return arg; - return Fceiling (wrong_type_argument (arg, Qnumberp)); + return Fceiling (wrong_type_argument (Qnumberp, arg)); } @@ -834,7 +839,7 @@ Return the nearest integer to ARG. if (INTP (arg)) return arg; - return Fround (wrong_type_argument (arg, Qnumberp)); + return Fround (wrong_type_argument (Qnumberp, arg)); } DEFUN ("truncate", Ftruncate, 1, 1, 0, /* @@ -851,7 +856,7 @@ Rounds the value toward zero. if (INTP (arg)) return arg; - return Ftruncate (wrong_type_argument (arg, Qnumberp)); + return Ftruncate (wrong_type_argument (Qnumberp, arg)); } /* Float-rounding functions. */