mirror of https://gitlab.com/ita1024/waf.git
Removed Utils.nogc as it is unused
This commit is contained in:
parent
b95db27d05
commit
333aec0b96
|
@ -16,4 +16,5 @@ NEW IN WAF 1.9
|
|||
* Enabled pre-forked builds by default
|
||||
* Modified the build scheduler to enable a consistent progress bar
|
||||
* Reduced the memory footprint of Task objects
|
||||
* Removed Utils.nogc
|
||||
|
||||
|
|
|
@ -715,14 +715,6 @@ if is_win32:
|
|||
shutil.copystat(src, dst)
|
||||
setattr(shutil, 'copy2', copy2)
|
||||
|
||||
if os.name == 'java':
|
||||
# Jython cannot disable the gc but they can enable it ... wtf?
|
||||
try:
|
||||
gc.disable()
|
||||
gc.enable()
|
||||
except NotImplementedError:
|
||||
gc.disable = gc.enable
|
||||
|
||||
def read_la_file(path):
|
||||
"""
|
||||
Read property files, used by msvc.py
|
||||
|
@ -740,25 +732,6 @@ def read_la_file(path):
|
|||
pass
|
||||
return dc
|
||||
|
||||
def nogc(fun):
|
||||
"""
|
||||
Decorator: let a function disable the garbage collector during its execution.
|
||||
It is used in the build context when storing/loading the build cache file (pickle)
|
||||
|
||||
:param fun: function to execute
|
||||
:type fun: function
|
||||
:return: the return value of the function executed
|
||||
"""
|
||||
def f(*k, **kw):
|
||||
try:
|
||||
gc.disable()
|
||||
ret = fun(*k, **kw)
|
||||
finally:
|
||||
gc.enable()
|
||||
return ret
|
||||
f.__doc__ = fun.__doc__
|
||||
return f
|
||||
|
||||
def run_once(fun):
|
||||
"""
|
||||
Decorator: let a function cache its results, use like this::
|
||||
|
|
Loading…
Reference in New Issue