diff options
Diffstat (limited to 'Cython')
-rw-r--r-- | Cython/Build/Dependencies.py | 8 | ||||
-rw-r--r-- | Cython/Utility/ObjectHandling.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index b024805aa..86531f441 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -399,8 +399,10 @@ dependency_regex = re.compile(r"(?:^\s*from +([0-9a-zA-Z_.]+) +cimport)|" r"(?:^\s*cimport +([0-9a-zA-Z_.]+(?: *, *[0-9a-zA-Z_.]+)*))|" r"(?:^\s*cdef +extern +from +['\"]([^'\"]+)['\"])|" r"(?:^\s*include +['\"]([^'\"]+)['\"])", re.M) -dependency_after_from_regex = re.compile(r"(?:^\s+\(((?:[0-9a-zA-Z_., ]*)*)\)[#\n])|" - r"(?:^\s+((?:[0-9a-zA-Z_., ]*))[#\n])", re.M) +dependency_after_from_regex = re.compile( + r"(?:^\s+\(([0-9a-zA-Z_., ]*)\)[#\n])|" + r"(?:^\s+([0-9a-zA-Z_., ]*)[#\n])", + re.M) def normalize_existing(base_path, rel_paths): @@ -494,7 +496,7 @@ def parse_dependencies(source_filename): if m_after_from: multiline, one_line = m_after_from.groups() subimports = multiline or one_line - cimports.extend("{}.{}".format(cimport_from, s.strip()) + cimports.extend("{0}.{1}".format(cimport_from, s.strip()) for s in subimports.split(',')) elif cimport_list: diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c index 75088f431..5c687759c 100644 --- a/Cython/Utility/ObjectHandling.c +++ b/Cython/Utility/ObjectHandling.c @@ -1964,7 +1964,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, // because f_localsplus is the last field of PyFrameObject (checked by Py_BUILD_ASSERT_EXPR below). #define __Pxy_PyFrame_Initialize_Offsets() \ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)), \ - (void)(__pyx_pyframe_localsplus_offset = PyFrame_Type.tp_basicsize - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame) \ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif |