Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 874 lines (784 sloc) 29.153 kb
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 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873
/* api.h
* Copyright (C) 2001-2012, 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 Parrot_PMC (*imcc_hack_func_t)(Parrot_PMC, Parrot_String, int, const char **);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CONST_FUNCTION
const unsigned char * get_program_code(void);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CONST_FUNCTION
size_t get_program_code_size(void);

/* Forward declaration of Parrot_confess. We can't include exceptions.h yet */
PARROT_EXPORT
PARROT_DOES_NOT_RETURN
PARROT_COLD
void
Parrot_confess(ARGIN(const char *cond), ARGIN(const char *file), unsigned int line);

#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_ASSERTS_ON 1
# 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 */

/* Static assertions are checked at compile type */
#define PARROT_STATIC_ASSERT_HELPER(COND, MSG) typedef char static_assertion_##MSG[(!!(COND))*2-1]
#define PARROT_STATIC_ASSERT3(X, L) PARROT_STATIC_ASSERT_HELPER(X, at_line_##L)
#define PARROT_STATIC_ASSERT2(X, L) PARROT_STATIC_ASSERT3(X, L)
#define PARROT_STATIC_ASSERT(X) PARROT_STATIC_ASSERT2((X), __LINE__)

typedef struct _Parrot_Init_Args {
    void *stacktop;
    const char *gc_system;
    Parrot_Float4 gc_nursery_size;
    Parrot_Int gc_dynamic_threshold;
    Parrot_Int gc_min_threshold;
    Parrot_UInt hash_seed;
    Parrot_UInt numthreads;
} 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_flag(
    Parrot_PMC interp_pmc,
    Parrot_Int flags,
    Parrot_Int set);

PARROT_API
Parrot_Int Parrot_api_get_compiler(
    Parrot_PMC interp_pmc,
    ARGIN(Parrot_String type),
    ARGOUT(Parrot_PMC *compiler))
        __attribute__nonnull__(2)
        __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_language(
    Parrot_PMC interp_pmc,
    ARGIN(Parrot_String lang))
        __attribute__nonnull__(2);

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_reset_call_signature(
    Parrot_PMC interp_pmc,
    ARGMOD(Parrot_PMC ctx))
        __attribute__nonnull__(2)
        FUNC_MODIFIES(ctx);

PARROT_API
Parrot_Int Parrot_api_set_compiler(
    Parrot_PMC interp_pmc,
    ARGIN(Parrot_String type),
    ARGIN(Parrot_PMC compiler))
        __attribute__nonnull__(2)
        __attribute__nonnull__(3);

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_runcore(
    Parrot_PMC interp_pmc,
    ARGIN(const char * corename),
    Parrot_UInt trace)
        __attribute__nonnull__(2);

PARROT_API
Parrot_Int Parrot_api_set_stdhandle(
    Parrot_PMC interp_pmc,
    Parrot_PMC handle,
    Parrot_Int fileno,
    ARGOUT(Parrot_PMC *old_handle))
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*old_handle);

PARROT_API
Parrot_Int Parrot_api_set_warnings(Parrot_PMC interp_pmc, Parrot_Int flags);

PARROT_API
Parrot_Int Parrot_api_toggle_gc(Parrot_PMC interp_pmc, Parrot_Int on);

PARROT_API
Parrot_Int Parrot_api_unwrap_pointer(
    Parrot_PMC interp_pmc,
    Parrot_PMC pmc,
    ARGOUT(void ** ptr),
    ARGOUT(Parrot_Int * size))
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(* ptr)
        FUNC_MODIFIES(* size);

PARROT_API
Parrot_Int Parrot_api_wrap_pointer(
    Parrot_PMC interp_pmc,
    ARGIN_NULLOK(void *ptr),
    Parrot_Int size,
    ARGOUT(Parrot_PMC *pmc))
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*pmc);

#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_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_get_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(type) \
, 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_language __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(lang))
#define ASSERT_ARGS_Parrot_api_make_interpreter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_api_reset_call_signature \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_api_set_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(type) \
, PARROT_ASSERT_ARG(compiler))
#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_runcore __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(corename))
#define ASSERT_ARGS_Parrot_api_set_stdhandle __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(old_handle))
#define ASSERT_ARGS_Parrot_api_set_warnings __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_toggle_gc __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_unwrap_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ptr) \
, PARROT_ASSERT_ARG(size))
#define ASSERT_ARGS_Parrot_api_wrap_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pmc))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/api.c */

/* HEADERIZER BEGIN: src/embed/bytecode.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */

PARROT_API
Parrot_Int Parrot_api_disassemble_bytecode(
    Parrot_PMC interp_pmc,
    Parrot_PMC pbc,
    ARGIN_NULLOK(const char * const outfile),
    Parrot_Int opts);

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(Parrot_String filename),
    ARGOUT(Parrot_PMC * pbc))
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* pbc);

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 args);

PARROT_API
Parrot_Int Parrot_api_serialize_bytecode_pmc(
    Parrot_PMC interp_pmc,
    Parrot_PMC pbc,
    ARGOUT(Parrot_String * bc))
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* bc);

PARROT_API
Parrot_Int Parrot_api_write_bytecode_to_file(
    Parrot_PMC interp_pmc,
    Parrot_PMC pbc,
    Parrot_String filename);

#define ASSERT_ARGS_Parrot_api_disassemble_bytecode \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#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_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_serialize_bytecode_pmc \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(bc))
#define ASSERT_ARGS_Parrot_api_write_bytecode_to_file \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/bytecode.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_byte_length(
    Parrot_PMC interp_pmc,
    Parrot_String str,
    ARGOUT(Parrot_Int * len))
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* len);

PARROT_API
Parrot_Int Parrot_api_string_export_ascii(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_String string),
    ARGOUT(char ** strout))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* strout);

PARROT_API
Parrot_Int Parrot_api_string_export_wchar(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_String string),
    ARGOUT(wchar_t ** strout))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* strout);

PARROT_API
Parrot_Int Parrot_api_string_free_exported_ascii(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(char * const str))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

PARROT_API
Parrot_Int Parrot_api_string_free_exported_wchar(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(wchar_t * const str))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

PARROT_API
Parrot_Int Parrot_api_string_import(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(const char * str),
    ARGOUT(Parrot_String * out))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* out);

PARROT_API
Parrot_Int Parrot_api_string_import_ascii(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(const char * str),
    ARGOUT(Parrot_String * out))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* out);

PARROT_API
Parrot_Int Parrot_api_string_import_binary(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(const unsigned char *bytes),
    Parrot_Int length,
    ARGIN(const char *encoding_name),
    ARGOUT(Parrot_String *out))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*out);

PARROT_API
Parrot_Int Parrot_api_string_import_wchar(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(wchar_t * str),
    ARGOUT(Parrot_String * out))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* out);

#define ASSERT_ARGS_Parrot_api_string_byte_length __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(len))
#define ASSERT_ARGS_Parrot_api_string_export_ascii \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, 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(interp_pmc) \
, 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(interp_pmc) \
, PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_string_free_exported_wchar \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_string_import __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(out))
#define ASSERT_ARGS_Parrot_api_string_import_ascii \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, 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(interp_pmc) \
, PARROT_ASSERT_ARG(bytes) \
, PARROT_ASSERT_ARG(encoding_name) \
, PARROT_ASSERT_ARG(out))
#define ASSERT_ARGS_Parrot_api_string_import_wchar \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, 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_pmc_box_float(
    Parrot_PMC interp_pmc,
    Parrot_Float value,
    ARGOUT(Parrot_PMC * float_pmc))
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* float_pmc);

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(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_String str),
    ARGOUT(Parrot_PMC * str_pmc))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* str_pmc);

PARROT_API
Parrot_Int Parrot_api_pmc_deserialize(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_String fpmc),
    ARGOUT(Parrot_PMC * pmc))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* pmc);

PARROT_API
Parrot_Int Parrot_api_pmc_deserialize_bytes(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(const unsigned char *fpmc),
    Parrot_Int length,
    ARGOUT(Parrot_PMC *pmc))
        __attribute__nonnull__(1)
        __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(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC key),
    ARGOUT(Parrot_PMC *class_pmc))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*class_pmc);

PARROT_API
Parrot_Int Parrot_api_pmc_get_float(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGOUT(Parrot_Float * value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* value);

PARROT_API
Parrot_Int Parrot_api_pmc_get_integer(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGOUT(Parrot_Int * value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __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(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    Parrot_Int key,
    ARGOUT(Parrot_PMC *value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*value);

PARROT_API
Parrot_Int Parrot_api_pmc_get_keyed_string(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGIN(Parrot_String key),
    ARGOUT(Parrot_PMC * value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(* value);

PARROT_API
Parrot_Int Parrot_api_pmc_get_string(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGOUT(Parrot_String * str))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(* str);

PARROT_API
Parrot_Int Parrot_api_pmc_invoke(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC sub),
    ARGIN(Parrot_PMC signature))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3);

PARROT_API
Parrot_Int Parrot_api_pmc_keep_alive(
    Parrot_PMC interp_pmc,
    Parrot_PMC pmc,
    Parrot_Int alive);

PARROT_API
Parrot_Int Parrot_api_pmc_new_call_object(
    Parrot_PMC interp_pmc,
    ARGOUT(Parrot_PMC *cc))
        __attribute__nonnull__(2)
        FUNC_MODIFIES(*cc);

PARROT_API
Parrot_Int Parrot_api_pmc_new_from_class(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC class_pmc),
    ARGIN_NULLOK(Parrot_PMC init),
    ARGOUT(Parrot_PMC * pmc))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(* pmc);

PARROT_API
Parrot_Int Parrot_api_pmc_null(
    ARGIN(Parrot_PMC interp_pmc),
    ARGOUT(Parrot_PMC *pmctonull))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        FUNC_MODIFIES(*pmctonull);

PARROT_API
Parrot_Int Parrot_api_pmc_push(
    Parrot_PMC interp_pmc,
    Parrot_PMC pmc,
    Parrot_PMC item);

PARROT_API
Parrot_Int Parrot_api_pmc_serialize(
    Parrot_PMC interp_pmc,
    Parrot_PMC object,
    ARGOUT(Parrot_String *frozen))
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*frozen);

PARROT_API
Parrot_Int Parrot_api_pmc_set_float(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    Parrot_Float value)
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

PARROT_API
Parrot_Int Parrot_api_pmc_set_integer(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    Parrot_Int value)
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

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(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    Parrot_Int key,
    ARGIN(Parrot_PMC value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(4);

PARROT_API
Parrot_Int Parrot_api_pmc_set_keyed_string(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGIN(Parrot_String key),
    ARGIN(Parrot_PMC value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4);

PARROT_API
Parrot_Int Parrot_api_pmc_set_string(
    ARGIN(Parrot_PMC interp_pmc),
    ARGIN(Parrot_PMC pmc),
    ARGIN(Parrot_String value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3);

PARROT_API
Parrot_Int Parrot_api_pmc_setup_signature(
    Parrot_PMC interp_pmc,
    Parrot_PMC callcontext,
    ARGIN(const char * const signature),
    ...)
        __attribute__nonnull__(3);

PARROT_API
Parrot_Int Parrot_api_pmc_wrap_string_array(
    ARGIN(Parrot_PMC interp_pmc),
    Parrot_Int argc,
    ARGIN(const char ** argv),
    ARGOUT(Parrot_PMC * args))
        __attribute__nonnull__(1)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(* args);

#define ASSERT_ARGS_Parrot_api_pmc_box_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(float_pmc))
#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(interp_pmc) \
, PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(str_pmc))
#define ASSERT_ARGS_Parrot_api_pmc_deserialize __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(fpmc) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_deserialize_bytes \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, 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(interp_pmc) \
, PARROT_ASSERT_ARG(key) \
, PARROT_ASSERT_ARG(class_pmc))
#define ASSERT_ARGS_Parrot_api_pmc_get_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, 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(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_keyed_string \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(key) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_get_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_Parrot_api_pmc_invoke __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(sub) \
, PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_api_pmc_keep_alive __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_new_call_object \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(cc))
#define ASSERT_ARGS_Parrot_api_pmc_new_from_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(class_pmc) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmctonull))
#define ASSERT_ARGS_Parrot_api_pmc_push __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_pmc_serialize __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(frozen))
#define ASSERT_ARGS_Parrot_api_pmc_set_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_api_pmc_set_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc))
#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 = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_set_keyed_string \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(key) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_set_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_api_pmc_setup_signature \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_api_pmc_wrap_string_array \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp_pmc) \
, 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 */

#endif /* PARROT_API_H_GUARD */

/*
* Local variables:
* c-file-style: "parrot"
* End:
* vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
*/
Something went wrong with that request. Please try again.