summaryrefslogtreecommitdiff
path: root/shared/runtime/pyexec.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-06-25 10:51:10 +1000
committerDamien George <damien@micropython.org>2024-07-19 11:55:24 +1000
commit77bd8fe5b80b0e7e02cdb6b4272c401ae3dca638 (patch)
tree7f7ea2efd256be591bc82927796712ccb09a00dd /shared/runtime/pyexec.c
parent5147dc5de5ac1eb0c733005e4fbd665bcffd74d4 (diff)
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/runtime/pyexec.c')
0 files changed, 0 insertions, 0 deletions