Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port plVaultClientApi to standard C++ containers #1468

Merged
merged 10 commits into from
Sep 12, 2023

Conversation

dgelessus
Copy link
Contributor

Here I go, touching more important and complex code - what could go wrong?

More seriously, this makes the vault logic a bit more readable and less complex, because it eliminates some manual memory management and wrapper structs. Some of the code is still quite verbose though, because of how the C++ map API is designed.

This eliminates the last use of the weird custom intrusive hash table pnUtHash (aka HASHTABLEDECL/HASHLINK).

@dgelessus
Copy link
Contributor Author

I wonder... considering that all RelVaultNodes are stored in a big global map, perhaps it would be possible to have that be the owner of all RelVaultNodes and skip the dynamic refcounting. No idea how well that would interact with the rest of the codebase though. In any case, that's not something I'll try in this PR 😅

@Hoikas
Copy link
Member

Hoikas commented Aug 17, 2023

I think that would be ideal (in another PR), but we'd want to make sure that pyVaultNode would be able to cope with that. I think that, strictly speaking, it is possible for Python scripts to persist after an Age's vault nodes have been culled, so we would probably be forced into maintaining a reference count for vault nodes.

@Hoikas Hoikas merged commit cfe6406 into H-uru:master Sep 12, 2023
14 checks passed
@dgelessus dgelessus deleted the plvault_std_containers branch November 29, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants