lp:~fredreichbier/+junk/pyjavascriptcore
- Get this branch:
- bzr branch lp:~fredreichbier/+junk/pyjavascriptcore
Branch information
- Owner:
- Friedrich Weber
- Status:
- Development
Recent revisions
- 68. By Friedrich Weber <fred@klops>
-
Fixed segfault on 64bit systems caused by a missing check if a given JSValueRef is a JSObjectRef.
- 67. By Martín Soto <soto@masoft>
-
Additional fix to GIL handling in the JavaScript to Python wrappers
* javascriptcore.pyx (pyObjInitialize): Add a "with gil" clause.
- 66. By Martín Soto <soto@masoft>
-
Fix wrapper caching for 64-bit platforms
* javascriptcore.pyx (wrapJSObject): Cast pointers to long instead of int
before using them as keys for the _pyWrappedJSObjs array. This is
necessary in 64-bit platforms because the may have an int type that is
actually smaller than the pointer type. This may fix Bug #504406. - 65. By Martín Soto <soto@masoft>
-
Rename finalizeCb function for consistency
* javascriptcore.pyx (pyObjFinalize): Renamed from finalizeCb.
- 64. By Martín Soto <soto@masoft>
-
Fix GIL handling in the JavaScript to Python wrappers
All functions registered as callbacks with JavaScriptCore and using
functions in the Python interpreter should acquire the GIL. Several
weren't in practice. Thanks to <email address hidden> (Bug
#554299) for pointing this out.* javascriptcore.pyx (pyObjDeletePro
perty, finalizeCb, pySeqHasProperty)
(pySeqDeleteProperty, pyMapGetPropert yNames, pyMapDeleteProp erty): Add
a "with gil" clause. - 63. By Martín Soto <soto@masoft>
-
Return JavaScript numbers that are integers as instances of int
* javascriptcore.pyx (jsToPython): Return JavaScript numbers that are
integers as instances of Python's int type.* test/jsfrompy.py (EvaluateScript
TestCase. testEvaluateInt 1)
(EvaluateScriptTestCase. testEvaluateInt 2)
(EvaluateScriptTestCase. testEvaluateInt 3): Check that returned integers
are actually of type int. - 62. By Martín Soto <soto@masoft>
-
Add wrapper caching for the Python-
wrapped- in-JavaScript direction * javascriptcore.pyx (_pyWrappedPyObjs): New dictionary to cache
JavaScript wrappers for Python objects.
(wrapJSObject): Fix declaration of 'wrapper' variable.
(wrapPyObject): New procedure to wrap Python objects into
JavaScript. This uses the wrapper cache.
(pythonToJS): Call wrapPyObject when wrapping objects.
(finalizeCb): Remove wrappers from the cache when they are
garbage-collected.
(_cachedStats): Add number of cached JavaSript wrappers to the returned
stats.* test/pyfromjs.py (WrapUnwrapTest
Case.testIdenti ty1)
(WrapUnwrapTestCase. testIdentity2) : New tests to make sure that the
same Python object always gets the same wrapper.* test/test.py: Make sure no wrappers remain cached after the tests are
run. - 61. By Martín Soto <soto@masoft>
-
Add PyCObject_
FromVoidPtr to python.pyi * python.pyi: Cleaned up. Added declaration for PyCObject_
FromVoidPtr. - 60. By Martín Soto <soto@masoft>
-
Add wrapper caching for the JavaScript-
wrapped- in-Python direction * javascriptcore.pyx (_pyWrappedJSObjs, wrapJSObject): New dictionary and
function to cache the wrappers of JavaScript objects so that objects
are not wrapped twice.
(jsToPython): Use the object wrapping implementation.
(_JSBaseObject.__weakref_ _): New attribute. Makes it possible to have
weak references to wrappers.
(_cachedStats): New debugging function. For the moment, it returns a
dictionary containing the number of objects currently cached in
_pyWrappedJSObjs.* test/jsfrompy.py (WrapUnwrapTest
Case.testIdenti ty1)
(WrapUnwrapTestCase. testIdentity2)
(WrapUnwrapTestCase. testCachedWrapp ers1): Test the caching mechanism. * test/test.py: Verify that no objects remain in the cache after running
the tests.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)