/
api.h
632 lines (557 loc) · 20.1 KB
/
api.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
/* api.h
* Copyright (C) 2001-2010, Parrot Foundation.
* Overview:
* Parrot's external embedding API. This functionality is only to be used
* by embedding applications, and only this functionality may be used by
* them.
*/
#ifndef PARROT_API_H_GUARD
#define PARROT_API_H_GUARD
#include <stdlib.h>
#include <wchar.h>
#include "parrot/compiler.h"
#include "parrot/config.h"
#include "parrot/core_types.h"
typedef int (*imcc_hack_func_t)(Parrot_PMC, const char *, int, const char **, Parrot_PMC*);
#define PARROT_API PARROT_EXPORT
/* having a modified version of PARROT_ASSERT which resolves as an integer
* rvalue lets us put ASSERT_ARGS() at the top of the list of local variables.
* Thus, we can catch bad pointers before any of the local initialization
* logic is run. And it always returns 0, so headerizer can chain them in
* ASSERT_ARGS_* macros like:
* int _ASSERT_ARGS = PARROT_ASSERT_ARG(a) || PARROT_ASSERT_ARG(b) || ...
*/
#ifdef NDEBUG
# define PARROT_ASSERT(x) /*@-noeffect@*/((void)0)/*@=noeffect@*/
# define PARROT_ASSERT_ARG(x) (0)
# define PARROT_FAILURE(x) /*@-noeffect@*/((void)0)/*@=noeffect@*/
# define PARROT_ASSERT_MSG(x, s) /*@-noeffect@*/((void)0)/*@=noeffect@*/
# define ASSERT_ARGS(a)
#else
# define PARROT_ASSERT(x) (x) ? ((void)0) : Parrot_confess(#x, __FILE__, __LINE__)
# define PARROT_ASSERT_ARG(x) ((x) ? (0) : (Parrot_confess(#x, __FILE__, __LINE__), 0))
# define PARROT_FAILURE(x) Parrot_confess((x), __FILE__, __LINE__)
# define PARROT_ASSERT_MSG(x, s) ((x) ? (0) : (Parrot_confess(s, __FILE__, __LINE__), 0))
# ifdef __GNUC__
# define ASSERT_ARGS(a) ASSERT_ARGS_ ## a ;
# else
# define ASSERT_ARGS(a)
# endif /* __GNUC__ */
#endif /* NDEBUG */
typedef struct _Parrot_Init_Args {
void *stacktop;
const char * gc_system;
Parrot_Int gc_threshold;
Parrot_UInt hash_seed;
} Parrot_Init_Args;
#define GET_INIT_STRUCT(i) do {\
void * __stacktop = NULL; \
(i) = (Parrot_Init_Args*)calloc(1, sizeof (Parrot_Init_Args)); \
(i)->stacktop = &__stacktop; \
} while (0)
/* HEADERIZER BEGIN: src/embed/api.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_API
Parrot_Int Parrot_api_add_dynext_search_path(
Parrot_PMC interp_pmc,
ARGIN(const char *path))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_add_include_search_path(
Parrot_PMC interp_pmc,
ARGIN(const char *path))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_add_library_search_path(
Parrot_PMC interp_pmc,
ARGIN(const char *path))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_debug_flag(
Parrot_PMC interp_pmc,
Parrot_Int flags,
Parrot_Int set);
PARROT_API
Parrot_Int Parrot_api_destroy_interpreter(Parrot_PMC interp_pmc);
PARROT_API
Parrot_Int Parrot_api_disassemble_bytecode(
Parrot_PMC interp_pmc,
Parrot_PMC pbc,
ARGIN(const char * const outfile),
Parrot_Int opts)
__attribute__nonnull__(3);
PARROT_API
Parrot_Int Parrot_api_flag(
Parrot_PMC interp_pmc,
Parrot_Int flags,
Parrot_Int set);
PARROT_API
Parrot_Int Parrot_api_get_compiler(
Parrot_PMC interp_pmc,
Parrot_String type,
ARGOUT(Parrot_PMC *compiler))
__attribute__nonnull__(3)
FUNC_MODIFIES(*compiler);
PARROT_API
Parrot_Int Parrot_api_get_exception_backtrace(
Parrot_PMC interp_pmc,
Parrot_PMC exception,
ARGOUT(Parrot_String * bt))
__attribute__nonnull__(3)
FUNC_MODIFIES(* bt);
PARROT_API
Parrot_Int Parrot_api_get_result(
Parrot_PMC interp_pmc,
ARGOUT(Parrot_Int *is_error),
ARGOUT(Parrot_PMC * exception),
ARGOUT(Parrot_Int *exit_code),
ARGOUT(Parrot_String * errmsg))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
__attribute__nonnull__(4)
__attribute__nonnull__(5)
FUNC_MODIFIES(*is_error)
FUNC_MODIFIES(* exception)
FUNC_MODIFIES(*exit_code)
FUNC_MODIFIES(* errmsg);
PARROT_API
Parrot_Int Parrot_api_get_runtime_path(
Parrot_PMC interp_pmc,
ARGOUT(Parrot_String *runtime))
__attribute__nonnull__(2)
FUNC_MODIFIES(*runtime);
PARROT_API
Parrot_Int Parrot_api_load_bytecode_bytes(
Parrot_PMC interp_pmc,
ARGIN(const unsigned char * const pbc),
Parrot_Int bytecode_size,
ARGOUT(Parrot_PMC * pbcpmc))
__attribute__nonnull__(2)
__attribute__nonnull__(4)
FUNC_MODIFIES(* pbcpmc);
PARROT_API
Parrot_Int Parrot_api_load_bytecode_file(
Parrot_PMC interp_pmc,
ARGIN(const char *filename),
ARGOUT(Parrot_PMC * pbc))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(* pbc);
PARROT_API
Parrot_Int Parrot_api_load_language(
Parrot_PMC interp_pmc,
Parrot_String lang);
PARROT_API
Parrot_Int Parrot_api_make_interpreter(
Parrot_PMC parent,
Parrot_Int flags,
ARGIN_NULLOK(Parrot_Init_Args *args),
ARGOUT(Parrot_PMC *interp))
__attribute__nonnull__(4)
FUNC_MODIFIES(*interp);
PARROT_API
Parrot_Int Parrot_api_ready_bytecode(
Parrot_PMC interp_pmc,
Parrot_PMC pbc,
ARGOUT(Parrot_PMC *main_sub))
__attribute__nonnull__(3)
FUNC_MODIFIES(*main_sub);
PARROT_API
Parrot_Int Parrot_api_run_bytecode(
Parrot_PMC interp_pmc,
Parrot_PMC pbc,
Parrot_PMC mainargs);
PARROT_API
Parrot_Int Parrot_api_set_compiler(
Parrot_PMC interp_pmc,
Parrot_String type,
Parrot_PMC compiler);
PARROT_API
Parrot_Int Parrot_api_set_configuration_hash(
Parrot_PMC interp_pmc,
Parrot_PMC confighash);
PARROT_API
Parrot_Int Parrot_api_set_executable_name(
Parrot_PMC interp_pmc,
ARGIN(const char * name))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_set_output_file(
Parrot_PMC interp_pmc,
ARGIN_NULLOK(const char * filename));
PARROT_API
Parrot_Int Parrot_api_set_runcore(
Parrot_PMC interp_pmc,
ARGIN(const char * corename),
Parrot_UInt trace)
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_set_stdhandles(
Parrot_PMC interp_pmc,
Parrot_Int in,
Parrot_Int out,
Parrot_Int err);
PARROT_API
Parrot_Int Parrot_api_set_warnings(Parrot_PMC interp_pmc, Parrot_Int flags);
PARROT_API
Parrot_Int Parrot_api_wrap_imcc_hack(
Parrot_PMC interp_pmc,
const char * sourcefile,
int argc,
const char **argv,
Parrot_PMC* bytecodepmc,
int *result,
imcc_hack_func_t func);
#define ASSERT_ARGS_Parrot_api_add_dynext_search_path \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(path))
#define ASSERT_ARGS_Parrot_api_add_include_search_path \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(path))
#define ASSERT_ARGS_Parrot_api_add_library_search_path \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(path))
#define ASSERT_ARGS_Parrot_api_debug_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_destroy_interpreter \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_disassemble_bytecode \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(outfile))
#define ASSERT_ARGS_Parrot_api_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_get_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(compiler))
#define ASSERT_ARGS_Parrot_api_get_exception_backtrace \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(bt))
#define ASSERT_ARGS_Parrot_api_get_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(is_error) \
, PARROT_ASSERT_ARG(exception) \
, PARROT_ASSERT_ARG(exit_code) \
, PARROT_ASSERT_ARG(errmsg))
#define ASSERT_ARGS_Parrot_api_get_runtime_path __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(runtime))
#define ASSERT_ARGS_Parrot_api_load_bytecode_bytes \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pbc) \
, PARROT_ASSERT_ARG(pbcpmc))
#define ASSERT_ARGS_Parrot_api_load_bytecode_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(filename) \
, PARROT_ASSERT_ARG(pbc))
#define ASSERT_ARGS_Parrot_api_load_language __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_make_interpreter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_api_ready_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(main_sub))
#define ASSERT_ARGS_Parrot_api_run_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_configuration_hash \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_executable_name \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS_Parrot_api_set_output_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_runcore __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(corename))
#define ASSERT_ARGS_Parrot_api_set_stdhandles __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_warnings __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_wrap_imcc_hack __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/api.c */
/* HEADERIZER BEGIN: src/embed/strings.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_API
Parrot_Int Parrot_api_string_export_ascii(
Parrot_PMC interp_pmc,
ARGIN(Parrot_String string),
ARGOUT(char ** strout))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(* strout);
PARROT_API
Parrot_Int Parrot_api_string_export_wchar(
Parrot_PMC interp_pmc,
ARGIN(Parrot_String string),
ARGOUT(wchar_t ** strout))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(* strout);
PARROT_API
Parrot_Int Parrot_api_string_free_exported_ascii(
Parrot_PMC interp_pmc,
ARGIN(char * const str))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_string_free_exported_wchar(
Parrot_PMC interp_pmc,
ARGIN(wchar_t * const str))
__attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_string_import_ascii(
Parrot_PMC interp_pmc,
ARGIN(const char * str),
ARGOUT(Parrot_String * out))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(* out);
PARROT_API
Parrot_Int Parrot_api_string_import_binary(
Parrot_PMC interp_pmc,
ARGIN(const unsigned char *bytes),
Parrot_Int length,
ARGOUT(Parrot_String *out))
__attribute__nonnull__(2)
__attribute__nonnull__(4)
FUNC_MODIFIES(*out);
PARROT_API
Parrot_Int Parrot_api_string_import_wchar(
Parrot_PMC interp_pmc,
ARGIN(wchar_t * str),
ARGOUT(Parrot_String * out))
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(* out);
#define ASSERT_ARGS_Parrot_api_string_export_ascii \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(string) \
, PARROT_ASSERT_ARG(strout))
#define ASSERT_ARGS_Parrot_api_string_export_wchar \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(string) \
, PARROT_ASSERT_ARG(strout))
#define ASSERT_ARGS_Parrot_api_string_free_exported_ascii \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_string_free_exported_wchar \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_string_import_ascii \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(out))
#define ASSERT_ARGS_Parrot_api_string_import_binary \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(bytes) \
, PARROT_ASSERT_ARG(out))
#define ASSERT_ARGS_Parrot_api_string_import_wchar \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(out))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/strings.c */
/* HEADERIZER BEGIN: src/embed/pmc.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_API
Parrot_Int Parrot_api_add_exception_handler(
Parrot_PMC interp_pmc,
Parrot_PMC handler);
PARROT_API
Parrot_Int Parrot_api_pmc_box_integer(
Parrot_PMC interp_pmc,
Parrot_Int value,
ARGOUT(Parrot_PMC * int_pmc))
__attribute__nonnull__(3)
FUNC_MODIFIES(* int_pmc);
PARROT_API
Parrot_Int Parrot_api_pmc_box_string(
Parrot_PMC interp_pmc,
Parrot_String str,
ARGOUT(Parrot_PMC * str_pmc))
__attribute__nonnull__(3)
FUNC_MODIFIES(* str_pmc);
PARROT_API
Parrot_Int Parrot_api_pmc_deserialize(
Parrot_PMC interp_pmc,
Parrot_String fpmc,
ARGOUT(Parrot_PMC * pmc))
__attribute__nonnull__(3)
FUNC_MODIFIES(* pmc);
PARROT_API
Parrot_Int Parrot_api_pmc_deserialize_bytes(
Parrot_PMC interp_pmc,
ARGIN(const unsigned char * const fpmc),
Parrot_Int length,
ARGOUT(Parrot_PMC * pmc))
__attribute__nonnull__(2)
__attribute__nonnull__(4)
FUNC_MODIFIES(* pmc);
PARROT_API
Parrot_Int Parrot_api_pmc_find_method(
Parrot_PMC interp_pmc,
Parrot_PMC object,
Parrot_String name,
ARGOUT(Parrot_PMC *method))
__attribute__nonnull__(4)
FUNC_MODIFIES(*method);
PARROT_API
Parrot_Int Parrot_api_pmc_get_class(
Parrot_PMC interp_pmc,
Parrot_PMC key,
ARGOUT(Parrot_PMC *class))
__attribute__nonnull__(3)
FUNC_MODIFIES(*class);
PARROT_API
Parrot_Int Parrot_api_pmc_get_float(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
ARGOUT(Parrot_Float * value))
__attribute__nonnull__(3)
FUNC_MODIFIES(* value);
PARROT_API
Parrot_Int Parrot_api_pmc_get_integer(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
ARGOUT(Parrot_Int * value))
__attribute__nonnull__(3)
FUNC_MODIFIES(* value);
PARROT_API
Parrot_Int Parrot_api_pmc_get_keyed(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_PMC key,
ARGOUT(Parrot_PMC * value))
__attribute__nonnull__(4)
FUNC_MODIFIES(* value);
PARROT_API
Parrot_Int Parrot_api_pmc_get_keyed_int(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_Int key,
ARGOUT(Parrot_PMC * value))
__attribute__nonnull__(4)
FUNC_MODIFIES(* value);
PARROT_API
Parrot_Int Parrot_api_pmc_get_keyed_string(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_String key,
ARGOUT(Parrot_PMC * value))
__attribute__nonnull__(4)
FUNC_MODIFIES(* value);
PARROT_API
Parrot_Int Parrot_api_pmc_get_string(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
ARGOUT(Parrot_String * str))
__attribute__nonnull__(3)
FUNC_MODIFIES(* str);
PARROT_API
Parrot_Int Parrot_api_pmc_invoke(
Parrot_PMC interp_pmc,
Parrot_PMC sub,
Parrot_PMC signature);
PARROT_API
Parrot_Int Parrot_api_pmc_new_from_class(
Parrot_PMC interp_pmc,
Parrot_PMC p_class,
Parrot_PMC init,
ARGOUT(Parrot_PMC * pmc))
__attribute__nonnull__(4)
FUNC_MODIFIES(* pmc);
PARROT_API
Parrot_Int Parrot_api_pmc_null(
Parrot_PMC interp_pmc,
ARGMOD(Parrot_PMC *pmctonull))
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmctonull);
PARROT_API
Parrot_Int Parrot_api_pmc_set_float(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_Float value);
PARROT_API
Parrot_Int Parrot_api_pmc_set_integer(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_Int value);
PARROT_API
Parrot_Int Parrot_api_pmc_set_keyed(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_PMC key,
Parrot_PMC value);
PARROT_API
Parrot_Int Parrot_api_pmc_set_keyed_int(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_Int key,
Parrot_PMC value);
PARROT_API
Parrot_Int Parrot_api_pmc_set_keyed_string(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_String key,
Parrot_PMC value);
PARROT_API
Parrot_Int Parrot_api_pmc_set_string(
Parrot_PMC interp_pmc,
Parrot_PMC pmc,
Parrot_String value);
PARROT_API
Parrot_Int Parrot_api_pmc_wrap_string_array(
Parrot_PMC interp_pmc,
Parrot_Int argc,
ARGIN(const char ** argv),
ARGOUT(Parrot_PMC * args))
__attribute__nonnull__(3)
__attribute__nonnull__(4)
FUNC_MODIFIES(* args);
#define ASSERT_ARGS_Parrot_api_add_exception_handler \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_box_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(int_pmc))
#define ASSERT_ARGS_Parrot_api_pmc_box_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str_pmc))
#define ASSERT_ARGS_Parrot_api_pmc_deserialize __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_deserialize_bytes \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(fpmc) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_find_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(method))
#define ASSERT_ARGS_Parrot_api_pmc_get_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(class))
#define ASSERT_ARGS_Parrot_api_pmc_get_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_keyed __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_keyed_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_keyed_string \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_pmc_invoke __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_new_from_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pmctonull))
#define ASSERT_ARGS_Parrot_api_pmc_set_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_set_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_set_keyed __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_set_keyed_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_set_keyed_string \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_set_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_wrap_string_array \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(argv) \
, PARROT_ASSERT_ARG(args))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/pmc.c */
/* Forward declaration because IMCC is still part of libparrot, but we don't
want to include parrot/imcc.h */
PARROT_API
int
imcc_run_api(ARGMOD(Parrot_PMC interp_pmc), ARGIN(const char *sourcefile), int argc,
ARGIN(const char **argv), ARGOUT(PMC **pbcpmc));
#endif /* PARROT_API_H_GUARD */
/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
*/