1#ifndef _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_ 2#define _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_ 3 4#ifdef __NEXT_RUNTIME__ 5 6#include "next-abi.h" 7#ifdef NEXT_OBJC_USE_NEW_INTERFACE 8#include <objc/runtime.h> 9#else 10#include <objc/objc-runtime.h> 11 12/* Missing from old NeXT objc headers... */ 13#define _C_LNG_LNG 'q' 14#define _C_ULNG_LNG 'Q' 15#define _C_ATOM '%' 16#define _C_BOOL 'B' 17 18#endif 19 20/* The NeXT headers do not define NULL. */ 21#ifndef NULL 22#define NULL 0 23#endif 24 25#define _C_CONST 'r' 26#define _C_IN 'n' 27#define _C_INOUT 'N' 28#define _C_OUT 'o' 29#define _C_BYCOPY 'O' 30#define _C_BYREF 'R' 31#define _C_ONEWAY 'V' 32#define _C_GCINVISIBLE '!' 33 34#define _F_CONST 0x01 35#define _F_IN 0x01 36#define _F_OUT 0x02 37#define _F_INOUT 0x03 38#define _F_BYCOPY 0x04 39#define _F_BYREF 0x08 40#define _F_ONEWAY 0x10 41#define _F_GCINVISIBLE 0x20 42 43/* The NeXT runtimes do not include these functions (at least not through 44 any public API). They are required for the objc/execute/bf-* and bycopy-3. */ 45 46struct objc_struct_layout 47{ 48 const char *original_type; 49 const char *type; 50 const char *prev_type; 51 unsigned int record_size; 52 unsigned int record_align; 53}; 54 55void objc_layout_structure_get_info (struct objc_struct_layout *,unsigned int *, 56 unsigned int *, const char **); 57void objc_layout_structure (const char *, struct objc_struct_layout *); 58BOOL objc_layout_structure_next_member (struct objc_struct_layout *); 59void objc_layout_finish_structure (struct objc_struct_layout *, unsigned int *, 60 unsigned int *); 61 62int objc_sizeof_type (const char *); 63int objc_alignof_type (const char *); 64int objc_aligned_size (const char *); 65int objc_promoted_size (const char *); 66 67unsigned objc_get_type_qualifiers (const char *); 68const char *objc_skip_type_qualifiers (const char *); 69const char *objc_skip_typespec (const char *); 70const char *objc_skip_offset (const char *); 71const char *objc_skip_argspec (const char *); 72 73#endif /* __NEXT_RUNTIME__ */ 74#endif /* _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_ */ 75