1 /* Copyright (C) 2012 Matthew Fluet.
2 * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
6 * MLton is released under a BSD-style license.
7 * See the file MLton-LICENSE for details.
10 #if (defined (MLTON_GC_INTERNAL_TYPES))
13 * Note, the value passed around is a pointer to the obj member.
15 struct GC_string8_obj
{
18 typedef struct GC_string8
{
19 GC_arrayCounter counter
;
20 GC_arrayLength length
;
22 struct GC_string8_obj obj
;
23 } __attribute__ ((packed
)) *GC_string8
;
25 COMPILE_TIME_ASSERT(GC_string8__obj_packed
,
26 offsetof(struct GC_string8
, obj
) ==
27 sizeof(GC_arrayCounter
)
28 + sizeof(GC_arrayLength
)
30 COMPILE_TIME_ASSERT(GC_string8_obj__chars_packed
,
31 offsetof(struct GC_string8_obj
, chars
) ==
34 #endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */
36 #if (defined (MLTON_GC_INTERNAL_FUNCS))
38 #define GC_STRING8_HEADER GC_WORD8_VECTOR_HEADER
40 #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */