[pypy-commit] pypy sandbox-lib: Remove the deprecated "sandboxsafe" argument to register_external()

arigo pypy.commits at gmail.com
Sun Mar 20 04:10:57 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: sandbox-lib
Changeset: r83181:d9ce306bebe1
Date: 2016-03-20 09:10 +0100
http://bitbucket.org/pypy/pypy/changeset/d9ce306bebe1/

Log:	Remove the deprecated "sandboxsafe" argument to register_external()

diff --git a/rpython/rlib/rfloat.py b/rpython/rlib/rfloat.py
--- a/rpython/rlib/rfloat.py
+++ b/rpython/rlib/rfloat.py
@@ -4,7 +4,6 @@
 
 from rpython.annotator.model import SomeString, SomeChar
 from rpython.rlib import objectmodel, unroll
-from rpython.rtyper.extfunc import register_external
 from rpython.rtyper.tool import rffi_platform
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 
diff --git a/rpython/rlib/rlocale.py b/rpython/rlib/rlocale.py
--- a/rpython/rlib/rlocale.py
+++ b/rpython/rlib/rlocale.py
@@ -178,8 +178,7 @@
     return decimal_point, thousands_sep, grouping
 
 register_external(numeric_formatting, [], (str, str, str),
-                  llimpl=numeric_formatting_impl,
-                  sandboxsafe=True)
+                  llimpl=numeric_formatting_impl)
 
 
 _setlocale = external('setlocale', [rffi.INT, rffi.CCHARP], rffi.CCHARP)
diff --git a/rpython/rtyper/extfunc.py b/rpython/rtyper/extfunc.py
--- a/rpython/rtyper/extfunc.py
+++ b/rpython/rtyper/extfunc.py
@@ -98,7 +98,7 @@
 
 
 def register_external(function, args, result=None, export_name=None,
-                       llimpl=None, llfakeimpl=None, sandboxsafe=None):
+                       llimpl=None, llfakeimpl=None):
     """
     function: the RPython function that will be rendered as an external function (e.g.: math.floor)
     args: a list containing the annotation of the arguments
@@ -106,7 +106,6 @@
     export_name: the name of the function as it will be seen by the backends
     llimpl: optional; if provided, this RPython function is called instead of the target function
     llfakeimpl: optional; if provided, called by the llinterpreter
-    sandboxsafe: IGNORED at this level
     """
 
     if export_name is None:
diff --git a/rpython/rtyper/extfuncregistry.py b/rpython/rtyper/extfuncregistry.py
--- a/rpython/rtyper/extfuncregistry.py
+++ b/rpython/rtyper/extfuncregistry.py
@@ -23,7 +23,7 @@
         f = getattr(rfloat, name)
     register_external(f, [float], float,
                       export_name="ll_math.ll_math_%s" % name,
-                       sandboxsafe=True, llimpl=llimpl)
+                      llimpl=llimpl)
 
 _register = [  # (module, [(method name, arg types, return type), ...], ...)
     (rfloat, [
@@ -54,5 +54,4 @@
         method_name = 'll_math_%s' % name
         register_external(getattr(module, name), arg_types, return_type,
                           export_name='ll_math.%s' % method_name,
-                          sandboxsafe=True,
                           llimpl=getattr(ll_math, method_name))
diff --git a/rpython/rtyper/lltypesystem/llarena.py b/rpython/rtyper/lltypesystem/llarena.py
--- a/rpython/rtyper/lltypesystem/llarena.py
+++ b/rpython/rtyper/lltypesystem/llarena.py
@@ -495,13 +495,11 @@
 register_external(arena_malloc, [int, int], llmemory.Address,
                   'll_arena.arena_malloc',
                   llimpl=llimpl_arena_malloc,
-                  llfakeimpl=arena_malloc,
-                  sandboxsafe=True)
+                  llfakeimpl=arena_malloc)
 
 register_external(arena_free, [llmemory.Address], None, 'll_arena.arena_free',
                   llimpl=llimpl_free,
-                  llfakeimpl=arena_free,
-                  sandboxsafe=True)
+                  llfakeimpl=arena_free)
 
 def llimpl_arena_reset(arena_addr, size, zero):
     if zero:
@@ -515,38 +513,34 @@
 register_external(arena_reset, [llmemory.Address, int, int], None,
                   'll_arena.arena_reset',
                   llimpl=llimpl_arena_reset,
-                  llfakeimpl=arena_reset,
-                  sandboxsafe=True)
+                  llfakeimpl=arena_reset)
 
 def llimpl_arena_reserve(addr, size):
     pass
 register_external(arena_reserve, [llmemory.Address, int], None,
                   'll_arena.arena_reserve',
                   llimpl=llimpl_arena_reserve,
-                  llfakeimpl=arena_reserve,
-                  sandboxsafe=True)
+                  llfakeimpl=arena_reserve)
 
 def llimpl_arena_shrink_obj(addr, newsize):
     pass
 register_external(arena_shrink_obj, [llmemory.Address, int], None,
                   'll_arena.arena_shrink_obj',
                   llimpl=llimpl_arena_shrink_obj,
-                  llfakeimpl=arena_shrink_obj,
-                  sandboxsafe=True)
+                  llfakeimpl=arena_shrink_obj)
 
 def llimpl_round_up_for_allocation(size, minsize):
     return (max(size, minsize) + (MEMORY_ALIGNMENT-1)) & ~(MEMORY_ALIGNMENT-1)
 register_external(_round_up_for_allocation, [int, int], int,
                   'll_arena.round_up_for_allocation',
                   llimpl=llimpl_round_up_for_allocation,
-                  llfakeimpl=round_up_for_allocation,
-                  sandboxsafe=True)
+                  llfakeimpl=round_up_for_allocation)
 
 def llimpl_arena_new_view(addr):
     return addr
 register_external(arena_new_view, [llmemory.Address], llmemory.Address,
                   'll_arena.arena_new_view', llimpl=llimpl_arena_new_view,
-                  llfakeimpl=arena_new_view, sandboxsafe=True)
+                  llfakeimpl=arena_new_view)
 
 def llimpl_arena_protect(addr, size, inaccessible):
     if has_protect:
@@ -561,12 +555,11 @@
 register_external(arena_protect, [llmemory.Address, lltype.Signed,
                                   lltype.Bool], lltype.Void,
                   'll_arena.arena_protect', llimpl=llimpl_arena_protect,
-                  llfakeimpl=arena_protect, sandboxsafe=True)
+                  llfakeimpl=arena_protect)
 
 def llimpl_getfakearenaaddress(addr):
     return addr
 register_external(getfakearenaaddress, [llmemory.Address], llmemory.Address,
                   'll_arena.getfakearenaaddress',
                   llimpl=llimpl_getfakearenaaddress,
-                  llfakeimpl=getfakearenaaddress,
-                  sandboxsafe=True)
+                  llfakeimpl=getfakearenaaddress)


More information about the pypy-commit mailing list