| 11752 | } |
| 11753 | |
| 11754 | static bool py_facts_owned(const CBMArena *arena, const CBMPyNamespaceFacts *facts) { |
| 11755 | if (!py_facts_owned_range(arena, facts->items, (size_t)facts->count * sizeof(*facts->items))) |
| 11756 | return false; |
| 11757 | for (int i = 0; i < facts->count; i++) { |
| 11758 | const CBMPyNamespaceFact *f = &facts->items[i]; |
| 11759 | if (!py_facts_owned_string(arena, f->local_name) || |
| 11760 | !py_facts_owned_string(arena, f->module_name) || |
| 11761 | !py_facts_owned_string(arena, f->member_name) || |
| 11762 | !py_facts_owned_range(arena, f->names, (size_t)f->name_count * sizeof(*f->names))) |
| 11763 | return false; |
| 11764 | for (int j = 0; j < f->name_count; j++) { |
| 11765 | if (!py_facts_owned_string(arena, f->names[j])) |
| 11766 | return false; |
| 11767 | } |
| 11768 | } |
| 11769 | return true; |
| 11770 | } |
| 11771 | |
| 11772 | static const char PY_FACTS_ORDERED[] = "def item():\n return 1\n" |
| 11773 | "from first import item\n" |
no test coverage detected