1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-05-01 22:26:50 +00:00

Correct parameter type declaration error for N_OP_ubfloat1

Ensure pointers have appropriate alignment for data being referenced
This commit is contained in:
Nick Briggs
2023-01-08 22:11:05 -08:00
parent c10d339036
commit 96fcc9475a
2 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
#ifndef UBF1DEFS_H #ifndef UBF1DEFS_H
#define UBF1DEFS_H 1 #define UBF1DEFS_H 1
#include "lispemul.h" /* for LispPTR */ #include "lispemul.h" /* for LispPTR */
LispPTR N_OP_ubfloat1(int arg, int alpha); LispPTR N_OP_ubfloat1(LispPTR arg, int alpha);
#endif #endif

View File

@@ -27,21 +27,21 @@
355/4 UFIX 355/4 UFIX
***********************************************************/ ***********************************************************/
LispPTR N_OP_ubfloat1(int arg, int alpha) { LispPTR N_OP_ubfloat1(LispPTR arg, int alpha) {
switch (alpha) { switch (alpha) {
case 0: /* box */ case 0: /* box */
{ {
DLword *wordp; LispPTR *wordp;
wordp = createcell68k(TYPE_FLOATP); wordp = createcell68k(TYPE_FLOATP);
*((int *)wordp) = arg; *wordp = arg;
return (LAddrFromNative(wordp)); return (LAddrFromNative(wordp));
} }
case 1: /* unbox */ case 1: /* unbox */
{ {
float dest; float dest;
int ret; LispPTR ret;
N_MakeFloat(arg, dest, arg); N_MakeFloat(arg, dest, arg);
ret = *(int *)&dest; ret = *(LispPTR *)&dest;
return (ret); return (ret);
} }
case 2: /* abs */ return (0x7FFFFFFF & arg); case 2: /* abs */ return (0x7FFFFFFF & arg);