Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r70278:6d63887bcf1a
Date: 2014-03-25 15:01 +0100
http://bitbucket.org/pypy/pypy/changeset/6d63887bcf1a/

Log:    Fix by a quick hack (that can be justified too): give
        transactionsafe=True to the calls that actually occur outside a
        transaction.

diff --git a/rpython/rtyper/lltypesystem/rffi.py 
b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -127,6 +127,12 @@
             has_callback)               # because the callback can do it
     assert not (elidable_function and random_effects_on_gcobjs)
 
+    if not _nowrapper and invoke_around_handlers:
+        # enable 'transactionsafe' so that the call to funcptr, which is
+        # really done outside a transaction, doesn't force stm/inevitable.py
+        # to insert a spurious stm_become_inevitable()
+        transactionsafe = True
+
     funcptr = lltype.functionptr(ext_type, name, external='C',
                                  transactionsafe=transactionsafe,
                                  compilation_info=compilation_info,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to