Author: Florin Papa <[email protected]>
Branch: resource_warning
Changeset: r83570:5a210502cd24
Date: 2016-04-07 17:59 +0300
http://bitbucket.org/pypy/pypy/changeset/5a210502cd24/

Log:    (florin, antocuni) Add get_track_resources to retrieve flag value

diff --git a/pypy/module/sys/__init__.py b/pypy/module/sys/__init__.py
--- a/pypy/module/sys/__init__.py
+++ b/pypy/module/sys/__init__.py
@@ -55,6 +55,7 @@
         'setrecursionlimit'     : 'vm.setrecursionlimit',
         'getrecursionlimit'     : 'vm.getrecursionlimit',
         'pypy_set_track_resources' : 'vm.set_track_resources',
+        'pypy_get_track_resources' : 'vm.get_track_resources',
         'setcheckinterval'      : 'vm.setcheckinterval',
         'getcheckinterval'      : 'vm.getcheckinterval',
         'exc_info'              : 'vm.exc_info',
diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -68,6 +68,9 @@
 def set_track_resources(space, flag):
     space.sys.track_resources = flag
 
+def get_track_resources(space):
+    return space.wrap(space.sys.track_resources)
+
 @unwrap_spec(interval=int)
 def setcheckinterval(space, interval):
     """Tell the Python interpreter to check for asynchronous events every
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to