Commit ef423d1e authored by Stefan Behnel's avatar Stefan Behnel

Use a constant sentinel value in Plex instead of making it depend on the (32/64 bit) architecture.

Closes #3659.
parent 0f1c1cbd
...@@ -3,6 +3,8 @@ cimport cython ...@@ -3,6 +3,8 @@ cimport cython
from .Actions cimport Action from .Actions cimport Action
from .Transitions cimport TransitionMap from .Transitions cimport TransitionMap
cdef long maxint
@cython.final @cython.final
cdef class Machine: cdef class Machine:
......
...@@ -9,10 +9,7 @@ from __future__ import absolute_import ...@@ -9,10 +9,7 @@ from __future__ import absolute_import
import cython import cython
from .Transitions import TransitionMap from .Transitions import TransitionMap
try: maxint = 2**31-1 # sentinel value
from sys import maxsize as maxint
except ImportError:
from sys import maxint
if not cython.compiled: if not cython.compiled:
try: try:
......
...@@ -6,13 +6,11 @@ Regular Expressions ...@@ -6,13 +6,11 @@ Regular Expressions
from __future__ import absolute_import from __future__ import absolute_import
import types import types
try:
from sys import maxsize as maxint
except ImportError:
from sys import maxint
from . import Errors from . import Errors
maxint = 2**31-1 # sentinel value
# #
# Constants # Constants
# #
......
...@@ -4,12 +4,8 @@ Plex - Transition Maps ...@@ -4,12 +4,8 @@ Plex - Transition Maps
This version represents state sets directly as dicts for speed. This version represents state sets directly as dicts for speed.
""" """
from __future__ import absolute_import
try: maxint = 2**31-1 # sentinel value
from sys import maxsize as maxint
except ImportError:
from sys import maxint
class TransitionMap(object): class TransitionMap(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment