1 /* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 static inline objptr
readObjptr (FILE *f
) {
11 fread_safe (&res
, sizeof(objptr
), 1, f
);
15 static inline pointer
readPointer (FILE *f
) {
17 fread_safe (&res
, sizeof(uintptr_t), 1, f
);
21 static inline void writeObjptr (FILE *f
, objptr op
) {
22 fwrite_safe (&op
, sizeof(objptr
), 1, f
);
25 static inline void writePointer (FILE *f
, pointer p
) {
26 uintptr_t u
= (uintptr_t)p
;
27 fwrite_safe (&u
, sizeof(uintptr_t), 1, f
);