fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / include / parrot / embed.h
blob2f6b2675ea211661121fd8e3cc6a7cd800f0e52e
1 /* embed.h
2 * Copyright (C) 2001-2010, Parrot Foundation.
3 * SVN Info
4 * $Id$
5 * Overview:
6 * This is the Parrot embedding system--the only part of Parrot that
7 * the outside world should see.
8 * References:
9 * embed.c, docs/embed.pod.
12 #ifndef PARROT_EMBED_H_GUARD
13 #define PARROT_EMBED_H_GUARD
15 #include "parrot/core_types.h" /* types used */
16 #include "parrot/compiler.h" /* compiler capabilities */
17 #include "parrot/config.h" /* PARROT_VERSION, PARROT_JIT_CAPABLE... */
18 #include "parrot/interpreter.h" /* give us the interpreter flags */
19 #include "parrot/warnings.h" /* give us the warnings flags */
21 typedef int Parrot_warnclass;
23 typedef enum {
24 enum_DIS_BARE = 1,
25 enum_DIS_HEADER = 2
26 } Parrot_disassemble_options;
28 /* Parrot_set_config_hash exists in *_config.o (e.g install_config.o),
29 so if you make this call then you will need to link with it in
30 addition to libparrot */
31 void Parrot_set_config_hash(void);
33 PARROT_EXPORT
34 PARROT_DOES_NOT_RETURN
35 PARROT_COLD
36 void
37 Parrot_exit(PARROT_INTERP, int status);
39 PARROT_EXPORT
40 void Parrot_destroy(PARROT_INTERP)
41 __attribute__nonnull__(1);
44 /* HEADERIZER BEGIN: src/embed.c */
45 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
47 PARROT_EXPORT
48 void Parrot_clear_debug(PARROT_INTERP, Parrot_UInt flag)
49 __attribute__nonnull__(1);
51 PARROT_EXPORT
52 void Parrot_clear_flag(PARROT_INTERP, Parrot_Int flag)
53 __attribute__nonnull__(1);
55 PARROT_EXPORT
56 void Parrot_clear_trace(PARROT_INTERP, Parrot_UInt flag)
57 __attribute__nonnull__(1);
59 PARROT_EXPORT
60 Parrot_PMC Parrot_compile_string(PARROT_INTERP,
61 Parrot_String type,
62 ARGIN(const char *code),
63 ARGOUT(Parrot_String *error))
64 __attribute__nonnull__(1)
65 __attribute__nonnull__(3)
66 __attribute__nonnull__(4)
67 FUNC_MODIFIES(*error);
69 PARROT_EXPORT
70 PARROT_CAN_RETURN_NULL
71 Parrot_Opcode * Parrot_debug(PARROT_INTERP,
72 ARGIN(Parrot_Interp debugger),
73 ARGIN(Parrot_Opcode *pc))
74 __attribute__nonnull__(1)
75 __attribute__nonnull__(2)
76 __attribute__nonnull__(3);
78 PARROT_EXPORT
79 void Parrot_disassemble(PARROT_INTERP,
80 ARGIN_NULLOK(const char *outfile),
81 Parrot_disassemble_options options)
82 __attribute__nonnull__(1);
84 PARROT_EXPORT
85 void Parrot_init_stacktop(PARROT_INTERP, ARGIN(void *stack_top))
86 __attribute__nonnull__(1)
87 __attribute__nonnull__(2);
89 PARROT_EXPORT
90 PARROT_CANNOT_RETURN_NULL
91 PARROT_MALLOC
92 Parrot_Interp Parrot_new(ARGIN_NULLOK(Parrot_Interp parent));
94 PARROT_EXPORT
95 void Parrot_pbc_fixup_loaded(PARROT_INTERP)
96 __attribute__nonnull__(1);
98 PARROT_EXPORT
99 void Parrot_pbc_load(PARROT_INTERP, ARGIN(Parrot_PackFile pf))
100 __attribute__nonnull__(1)
101 __attribute__nonnull__(2);
103 PARROT_EXPORT
104 PARROT_CAN_RETURN_NULL
105 Parrot_PackFile Parrot_pbc_read(PARROT_INTERP,
106 ARGIN_NULLOK(const char *fullname),
107 const int debug)
108 __attribute__nonnull__(1);
110 PARROT_EXPORT
111 void Parrot_run_native(PARROT_INTERP, native_func_t func)
112 __attribute__nonnull__(1);
114 PARROT_EXPORT
115 void Parrot_runcode(PARROT_INTERP, int argc, ARGIN(const char **argv))
116 __attribute__nonnull__(1)
117 __attribute__nonnull__(3);
119 PARROT_EXPORT
120 void Parrot_set_debug(PARROT_INTERP, Parrot_UInt flag)
121 __attribute__nonnull__(1);
123 PARROT_EXPORT
124 void Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
125 __attribute__nonnull__(1);
127 PARROT_EXPORT
128 void Parrot_set_flag(PARROT_INTERP, Parrot_Int flag)
129 __attribute__nonnull__(1);
131 PARROT_EXPORT
132 void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)
133 __attribute__nonnull__(1);
135 PARROT_EXPORT
136 void Parrot_set_trace(PARROT_INTERP, Parrot_UInt flag)
137 __attribute__nonnull__(1);
139 PARROT_EXPORT
140 void Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass wc)
141 __attribute__nonnull__(1);
143 PARROT_EXPORT
144 PARROT_PURE_FUNCTION
145 Parrot_UInt Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)
146 __attribute__nonnull__(1);
148 PARROT_EXPORT
149 PARROT_PURE_FUNCTION
150 Parrot_Int Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)
151 __attribute__nonnull__(1);
153 PARROT_EXPORT
154 PARROT_PURE_FUNCTION
155 Parrot_UInt Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)
156 __attribute__nonnull__(1);
158 #define ASSERT_ARGS_Parrot_clear_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
159 PARROT_ASSERT_ARG(interp))
160 #define ASSERT_ARGS_Parrot_clear_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
161 PARROT_ASSERT_ARG(interp))
162 #define ASSERT_ARGS_Parrot_clear_trace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
163 PARROT_ASSERT_ARG(interp))
164 #define ASSERT_ARGS_Parrot_compile_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
165 PARROT_ASSERT_ARG(interp) \
166 , PARROT_ASSERT_ARG(code) \
167 , PARROT_ASSERT_ARG(error))
168 #define ASSERT_ARGS_Parrot_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
169 PARROT_ASSERT_ARG(interp) \
170 , PARROT_ASSERT_ARG(debugger) \
171 , PARROT_ASSERT_ARG(pc))
172 #define ASSERT_ARGS_Parrot_disassemble __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
173 PARROT_ASSERT_ARG(interp))
174 #define ASSERT_ARGS_Parrot_init_stacktop __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
175 PARROT_ASSERT_ARG(interp) \
176 , PARROT_ASSERT_ARG(stack_top))
177 #define ASSERT_ARGS_Parrot_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
178 #define ASSERT_ARGS_Parrot_pbc_fixup_loaded __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
179 PARROT_ASSERT_ARG(interp))
180 #define ASSERT_ARGS_Parrot_pbc_load __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
181 PARROT_ASSERT_ARG(interp) \
182 , PARROT_ASSERT_ARG(pf))
183 #define ASSERT_ARGS_Parrot_pbc_read __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
184 PARROT_ASSERT_ARG(interp))
185 #define ASSERT_ARGS_Parrot_run_native __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
186 PARROT_ASSERT_ARG(interp))
187 #define ASSERT_ARGS_Parrot_runcode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
188 PARROT_ASSERT_ARG(interp) \
189 , PARROT_ASSERT_ARG(argv))
190 #define ASSERT_ARGS_Parrot_set_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
191 PARROT_ASSERT_ARG(interp))
192 #define ASSERT_ARGS_Parrot_set_executable_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
193 PARROT_ASSERT_ARG(interp))
194 #define ASSERT_ARGS_Parrot_set_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
195 PARROT_ASSERT_ARG(interp))
196 #define ASSERT_ARGS_Parrot_set_run_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
197 PARROT_ASSERT_ARG(interp))
198 #define ASSERT_ARGS_Parrot_set_trace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
199 PARROT_ASSERT_ARG(interp))
200 #define ASSERT_ARGS_Parrot_setwarnings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
201 PARROT_ASSERT_ARG(interp))
202 #define ASSERT_ARGS_Parrot_test_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
203 PARROT_ASSERT_ARG(interp))
204 #define ASSERT_ARGS_Parrot_test_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
205 PARROT_ASSERT_ARG(interp))
206 #define ASSERT_ARGS_Parrot_test_trace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
207 PARROT_ASSERT_ARG(interp))
208 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
209 /* HEADERIZER END: src/embed.c */
212 #endif /* PARROT_EMBED_H_GUARD */
215 * Local variables:
216 * c-file-style: "parrot"
217 * End:
218 * vim: expandtab shiftwidth=4: