Skip to content

Conversation

@ogarokpeter
Copy link
Collaborator

This change fixes the issue when users create a csp.Struct with a typed list field ([int]) and try to modify this list field in Python, only to find that their changes are lost. The issue occurred because the typed list fields are stored as C++ vectors, and Python changes to those fields are not mirrored on them by mutating operations. My change implements such mirroring by creating a wrapper type for typed list fields, PyStructList, and capturing all list-mutating Python operations via Python C API.

@ogarokpeter ogarokpeter merged commit 5d7eeb7 into main Apr 10, 2024
@ogarokpeter ogarokpeter deleted the bug/struct-list branch April 10, 2024 14:04
@timkpaine timkpaine added the type: bug Concrete, reproducible bugs label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Concrete, reproducible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants