mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-11 23:43:19 +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:
parent
c10d339036
commit
96fcc9475a
@ -1,5 +1,5 @@
|
||||
#ifndef UBF1DEFS_H
|
||||
#define UBF1DEFS_H 1
|
||||
#include "lispemul.h" /* for LispPTR */
|
||||
LispPTR N_OP_ubfloat1(int arg, int alpha);
|
||||
LispPTR N_OP_ubfloat1(LispPTR arg, int alpha);
|
||||
#endif
|
||||
|
||||
10
src/ubf1.c
10
src/ubf1.c
@ -27,21 +27,21 @@
|
||||
355/4 UFIX
|
||||
***********************************************************/
|
||||
|
||||
LispPTR N_OP_ubfloat1(int arg, int alpha) {
|
||||
LispPTR N_OP_ubfloat1(LispPTR arg, int alpha) {
|
||||
switch (alpha) {
|
||||
case 0: /* box */
|
||||
{
|
||||
DLword *wordp;
|
||||
LispPTR *wordp;
|
||||
wordp = createcell68k(TYPE_FLOATP);
|
||||
*((int *)wordp) = arg;
|
||||
*wordp = arg;
|
||||
return (LAddrFromNative(wordp));
|
||||
}
|
||||
case 1: /* unbox */
|
||||
{
|
||||
float dest;
|
||||
int ret;
|
||||
LispPTR ret;
|
||||
N_MakeFloat(arg, dest, arg);
|
||||
ret = *(int *)&dest;
|
||||
ret = *(LispPTR *)&dest;
|
||||
return (ret);
|
||||
}
|
||||
case 2: /* abs */ return (0x7FFFFFFF & arg);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user