diff options
author | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:19:22 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-08-19 06:19:22 +0000 |
commit | 8050106d520b05b1d3eadff068d2ba6baa3c2612 (patch) | |
tree | 64d8f08761b781559868d943da993dc3b9e080ad /src/data.c | |
parent | 47f6953d1219ce388bb8436e5326a399ce7a661b (diff) | |
download | emacs-8050106d520b05b1d3eadff068d2ba6baa3c2612.tar.gz |
* 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.
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c index f963a323d7d..9b45fc61c30 100644 --- a/src/data.c +++ b/src/data.c @@ -604,8 +604,19 @@ store_symval_forwarding (sym, valcontents, newval) 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 @@ Both must be numbers or markers.") 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)); |