1 #ifndef _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_
2 #define _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_
4 #ifdef __NEXT_RUNTIME__
7 #ifdef NEXT_OBJC_USE_NEW_INTERFACE
8 #include <objc/runtime.h>
11 #include <objc/objc-runtime.h>
12 typedef struct objc_method
* PMETH
;
15 /* The NeXT headers do not define NULL. */
20 /* The NeXT runtimes do not include these functions (at least not through
21 any public API). They are required for the objc/execute/bf-* and bycopy-3. */
23 /* Not sure why the following are missing from NeXT objc headers... */
26 #define _C_LNG_LNG 'q'
29 #define _C_ULNG_LNG 'Q'
45 #define _C_GCINVISIBLE '!'
51 #define _F_BYCOPY 0x04
53 #define _F_ONEWAY 0x10
54 #define _F_GCINVISIBLE 0x20
56 /* Functions available in the GNU runtime, emulated here for testing with NeXT. */
58 struct objc_struct_layout
60 const char *original_type
;
62 const char *prev_type
;
63 unsigned int record_size
;
64 unsigned int record_align
;
67 typedef union arglist
{
69 char arg_regs
[sizeof (char*)];
70 } *arglist_t
; /* argument frame */
72 void objc_layout_structure_get_info (struct objc_struct_layout
*,unsigned int *,
73 unsigned int *, const char **);
74 void objc_layout_structure (const char *, struct objc_struct_layout
*);
75 BOOL
objc_layout_structure_next_member (struct objc_struct_layout
*);
76 void objc_layout_finish_structure (struct objc_struct_layout
*, unsigned int *,
79 int objc_sizeof_type (const char *);
80 int objc_alignof_type (const char *);
81 int objc_aligned_size (const char *);
82 int objc_promoted_size (const char *);
84 unsigned objc_get_type_qualifiers (const char *);
85 const char *objc_skip_type_qualifiers (const char *);
86 const char *objc_skip_typespec (const char *);
87 const char *objc_skip_offset (const char *);
88 const char *objc_skip_argspec (const char *);
90 int method_get_number_of_arguments (PMETH
);
91 int method_get_sizeof_arguments (PMETH
);
92 char *method_get_next_argument (arglist_t
, const char **);
93 char *method_get_first_argument (PMETH
, arglist_t
, const char **);
94 char *method_get_nth_argument (PMETH
, arglist_t
, int, const char **);
96 #endif /* __NEXT_RUNTIME__ */
97 #endif /* _OBJC_TEST_SUITE_NEXT_ENCODE_ASSIST_H_ */