Author: Amaury Forgeot d'Arc <amaur...@gmail.com>
Branch: more-rposix
Changeset: r74850:3b5d1aeee6d5
Date: 2014-12-06 11:37 +0100
http://bitbucket.org/pypy/pypy/changeset/3b5d1aeee6d5/

Log:    Better placement for sandbox properties

diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -296,12 +296,12 @@
         class ExtRegistry(ExtRegistryEntry):
             _about_ = replaced_function
             def compute_annotation(self):
+                if sandboxed_name:
+                    config = self.bookkeeper.annotator.translator.config
+                    if config.translation.sandbox:
+                        func._sandbox_external_name = sandboxed_name
+                        func._dont_inline_ = True
                 return self.bookkeeper.immutablevalue(func)
-
-        if sandboxed_name:
-            func._sandbox_external_name = sandboxed_name
-            # XXX THIS IS NOT CORRECT. Only do this when config.sandbox.
-            func._dont_inline_ = True
         return func
     return wrap
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to