summaryrefslogtreecommitdiff
path: root/Cython
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-11-23 19:17:44 +0100
committerStefan Behnel <stefan_ml@behnel.de>2018-11-23 19:17:44 +0100
commit090f9ba2c8259a260780f1ed3caced796bc49d87 (patch)
tree2e2fc37794b4e622e4a7198dd2170db8b816e87c /Cython
parent72e176f545858d492c72d6424281c3a322daca98 (diff)
parent0347069ee126366f317ed7eeb2a997aab8579db5 (diff)
downloadcython-090f9ba2c8259a260780f1ed3caced796bc49d87.tar.gz
Merge branch 'release'
Diffstat (limited to 'Cython')
-rw-r--r--Cython/Build/Dependencies.py8
-rw-r--r--Cython/Utility/ObjectHandling.c2
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