| 661 | } |
| 662 | |
| 663 | void CPlugin::DependencyDropped(CPlugin *pOwner) |
| 664 | { |
| 665 | if (!m_pRuntime) |
| 666 | return; |
| 667 | |
| 668 | for (auto lib_iter=pOwner->m_Libraries.begin(); lib_iter!=pOwner->m_Libraries.end(); lib_iter++) { |
| 669 | if (m_RequiredLibs.find(*lib_iter) != m_RequiredLibs.end()) { |
| 670 | m_LibraryMissing = true; |
| 671 | break; |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | unsigned int unbound = 0; |
| 676 | for (size_t i = 0; i < pOwner->m_fakes.size(); i++) |
| 677 | { |
| 678 | ke::RefPtr<Native> entry(pOwner->m_fakes[i]); |
| 679 | |
| 680 | uint32_t idx; |
| 681 | if (m_pRuntime->FindNativeByName(entry->name(), &idx) != SP_ERROR_NONE) |
| 682 | continue; |
| 683 | |
| 684 | m_pRuntime->UpdateNativeBinding(idx, nullptr, 0, nullptr); |
| 685 | unbound++; |
| 686 | } |
| 687 | |
| 688 | if (unbound) |
| 689 | { |
| 690 | m_FakeNativesMissing = true; |
| 691 | } |
| 692 | |
| 693 | /* :IDEA: in the future, add native trapping? */ |
| 694 | if (m_FakeNativesMissing || m_LibraryMissing) |
| 695 | { |
| 696 | EvictWithError(Plugin_Error, "Depends on plugin: %s", pOwner->GetFilename()); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | size_t CPlugin::GetConfigCount() |
| 701 | { |
no test coverage detected