| 610 | | =item C<PMC * Parrot_find_global_s(PARROT_INTERP, STRING *str_key, STRING |
| 611 | | *globalname)> |
| 612 | | |
| 613 | | Search the namespace designated by C<str_key>, or the HLL root if |
| 614 | | C<str_key> is NULL, for an object with name C<globalname>. Return the |
| 615 | | object, or NULL if not found. |
| 616 | | |
| 617 | | TT #1222 - For now this function prefers non-namespaces, it will eventually |
| 618 | | entirely use the untyped interface. |
| 619 | | |
| 620 | | =cut |
| 621 | | |
| 622 | | */ |
| 623 | | |
| 624 | | PARROT_EXPORT |
| 625 | | PARROT_WARN_UNUSED_RESULT |
| 626 | | PARROT_CAN_RETURN_NULL |
| 627 | | PMC * |
| 628 | | Parrot_find_global_s(PARROT_INTERP, ARGIN_NULLOK(STRING *str_key), |
| 629 | | ARGIN_NULLOK(STRING *globalname)) |
| 630 | | { |
| 631 | | ASSERT_ARGS(Parrot_find_global_s) |
| 632 | | PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp); |
| 633 | | PMC * const ns = Parrot_ns_get_namespace_keyed_str(interp, hll_ns, str_key); |
| 634 | | return Parrot_ns_find_namespace_global(interp, ns, globalname); |
| 635 | | } |
| 636 | | |
| 637 | | /* |
| 638 | | |
| 664 | | =item C<void Parrot_store_global_s(PARROT_INTERP, STRING *str_key, STRING |
| 665 | | *globalname, PMC *val)> |
| 666 | | |
| 667 | | Store the PMC C<val> into the namespace designated by C<str_key>, or |
| 668 | | the HLL root if C<str_key> is NULL, with the name C<globalname>. |
| 669 | | |
| 670 | | =cut |
| 671 | | |
| 672 | | */ |
| 673 | | |
| 674 | | PARROT_EXPORT |
| 675 | | void |
| 676 | | Parrot_store_global_s(PARROT_INTERP, ARGIN_NULLOK(STRING *str_key), |
| 677 | | ARGIN_NULLOK(STRING *globalname), ARGIN_NULLOK(PMC *val)) |
| 678 | | { |
| 679 | | ASSERT_ARGS(Parrot_store_global_s) |
| 680 | | PMC * const hll_ns = Parrot_get_ctx_HLL_namespace(interp); |
| 681 | | PMC * const ns = Parrot_ns_make_namespace_keyed_str(interp, hll_ns, str_key); |
| 682 | | Parrot_ns_store_global(interp, ns, globalname, val); |
| 683 | | |
| 684 | | /* TT #1225 - method cache invalidation should be a namespace function */ |
| 685 | | Parrot_invalidate_method_cache(interp, str_key); |
| 686 | | } |
| 687 | | |
| 688 | | |
| 689 | | /* |
| 690 | | |