Distributive-Network / PythonMonkey

A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment.
https://pythonmonkey.io
Other
854 stars 40 forks source link

JSString Improvements #353

Closed zollqir closed 5 months ago

zollqir commented 6 months ago

This PR fixes #293, an issue where strings returned by eval were rooted for the entire lifetime of the program, rather than only for the lifetime of the underlying PyUnicodeObject.

This PR also fixes #299, an issue where JSExternalStrings passed back to python would create a new PyUnicodeObject using the same underlying char buffer, rather than the exact same PyUnicodeObject.