Mercurial > emacs
changeset 1002:65f15f1961d8
* data.c [USG] (Frem): Call fmod, rather than drem. Rah.
* data.c (store_symval_forwarding): When storing through a
Lisp_Buffer_Objfwd, check if the slot requires a particular type,
and report an error if the types clash.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 19 Aug 1992 06:19:22 +0000 |
parents | c1ebe69206df |
children | aa167fe80ce4 |
files | src/data.c |
diffstat | 1 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/data.c Wed Aug 19 06:18:37 1992 +0000 +++ b/src/data.c Wed Aug 19 06:19:22 1992 +0000 @@ -604,8 +604,19 @@ break; case Lisp_Buffer_Objfwd: - *(Lisp_Object *)(XUINT (valcontents) + (char *)current_buffer) = newval; - break; + { + unsigned int offset = XUINT (valcontents); + Lisp_Object type = + *(Lisp_Object *)(offset + (char *)&buffer_local_types); + + if (! NILP (type) && ! NILP (newval) + && XTYPE (newval) != XINT (type)) + buffer_slot_type_mismatch (valcontents, newval); + + *(Lisp_Object *)(XUINT (valcontents) + (char *)current_buffer) + = newval; + break; + } default: valcontents = XSYMBOL (sym)->value; @@ -1638,7 +1649,11 @@ f1 = XTYPE (num1) == Lisp_Float ? XFLOAT (num1)->data : XINT (num1); f2 = XTYPE (num2) == Lisp_Float ? XFLOAT (num2)->data : XINT (num2); +#ifdef USG + f1 = fmod (f1, f2); +#else f1 = drem (f1, f2); +#endif if (f1 < 0) f1 += f2; return (make_float (f1));