diff options
author | Damien George <damien@micropython.org> | 2024-06-25 10:51:10 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-07-19 11:55:24 +1000 |
commit | 77bd8fe5b80b0e7e02cdb6b4272c401ae3dca638 (patch) | |
tree | 7f7ea2efd256be591bc82927796712ccb09a00dd /shared/tinyusb | |
parent | 5147dc5de5ac1eb0c733005e4fbd665bcffd74d4 (diff) | |
download | micropython-77bd8fe5b80b0e7e02cdb6b4272c401ae3dca638.tar.gz micropython-77bd8fe5b80b0e7e02cdb6b4272c401ae3dca638.zip |
webassembly: Reuse PyProxy objects when they are the same Python object.
This commit makes it so that PyProxy objects are reused (on the JavaScript
side) when they correspond to an existing Python object that is the same
object.
For example, proxying the same Python function to JavaScript, the same
PyProxy instance is now used. This means that if `foo` is a Python
function then accessing it on the JavaScript side such as
`api.globals().get("foo")` has the property that:
api.globals().get("foo") === api.globals().get("foo")
Prior to this commit the above was not true because new PyProxy instances
were created each time `foo` was accessed.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'shared/tinyusb')
0 files changed, 0 insertions, 0 deletions