Skip to content

Commit b221dbb

Browse files
committed
Allow running pystone standalone
1 parent d36e150 commit b221dbb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

benches/benchmarks/pystone.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def copy(self):
7474
PtrGlb = None
7575
PtrGlbNext = None
7676

77-
def Proc0(loops=LOOPS):
77+
def Proc0(loops):
7878
global IntGlob
7979
global BoolGlob
8080
global Char1Glob
@@ -251,4 +251,10 @@ def Func3(EnumParIn):
251251
return FALSE
252252

253253
if __name__ == '__main__':
254+
if "LOOPS" not in globals():
255+
import sys
256+
if len(sys.argv) < 2:
257+
LOOPS = 50000
258+
else:
259+
LOOPS = int(sys.argv[1])
254260
Proc0(LOOPS)

0 commit comments

Comments
 (0)