refactor: pam_pmm_state& как явный параметр pam_pmm_* функций (Этап 11.1, Проблема 3 Этап B, Issue #209)#226
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: netkeep80#209
…тап 11.1, Проблема 3 Этап B, Issue netkeep80#209) Все pam_pmm_* функции (init, save, destroy, reset, is_initialized, create, create_array, delete, find, find_typed, get_root, get_registry, get_name, get_count, get_elem_size, slot_count, named_count, realloc, validate) теперь принимают pam_pmm_state& как первый параметр. Глобальные обёртки без параметра сохранены для обратной совместимости и делегируют pam_pmm_global_state(). pjson_db_pmm хранит указатель на pam_pmm_state и использует явные версии функций. Добавлены конструктор и open() с явным состоянием. Добавлены 9 тестов на явный параметр состояния: init/destroy, create/find/delete, create_array, get_root/get_registry, reset, slot_count/named_count, validate, pjson_db_pmm с явным состоянием, pjson_db_pmm::open с явным состоянием. Все 709 тестов проходят (700 + 9 новых). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 3867040.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (4344KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pam_pmm_*функции (init,save,destroy,reset,is_initialized,create,create_array,delete,find,find_typed,get_root,get_registry,get_name,get_count,get_elem_size,slot_count,named_count,realloc,validate) принимаютpam_pmm_state&как первый параметрpam_pmm_global_state()pjson_db_pmmхранит указатель наpam_pmm_stateи использует явные версии функцийpjson_db_pmm(pam_pmm_state&)иpjson_db_pmm::open(pam_pmm_state&, const char*)pjson_db_pmm::state()для доступа к используемому состояниюplan.mdиreadme.mdКонтекст
Это Этап 11.1 (Проблема 3, Этап B) из plan.md — второй шаг к поддержке нескольких экземпляров БД в одном процессе. Зависимость от глобального состояния теперь сделана явной: каждая функция принимает
pam_pmm_state&как параметр, аpjson_db_pmmхранит ссылку на конкретный экземпляр состояния.PamManager (PMM-бэкенд) остаётся глобальным синглтоном — это ограничение будет снято в будущих этапах.
Fixes
Fixes #209
Test plan
deps/pmm/pmm.h)🤖 Generated with Claude Code