Skip to content

Commit

Permalink
Fix Windows Support
Browse files Browse the repository at this point in the history
  • Loading branch information
xie-dongping committed Sep 11, 2017
1 parent 6d87997 commit 05be6ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modparc/__init__.py
Expand Up @@ -5,7 +5,6 @@
A Modelica parser using parser combinator.
"""
import resource
import sys

import modparc.specification
Expand All @@ -19,7 +18,13 @@
import modparc.syntax.stored_definition # noqa: F401
from modparc.parse import (parse, parse_file) # noqa: F401

resource.setrlimit(resource.RLIMIT_STACK, (2**29, -1))

try:
import resource
resource.setrlimit(resource.RLIMIT_STACK, (2**29, -1))
except:
print("Warning: stack size in Windows might not be enough for arrays")

sys.setrecursionlimit(10**6)

__author__ = """谢东平 Dongping XIE"""
Expand Down

0 comments on commit 05be6ee

Please sign in to comment.