1
- diff -u -r a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
2
- --- a/Cython/Build/Dependencies.py 2023-01-04 11:56:12.000000000 +0100
3
- +++ b/Cython/Build/Dependencies.py 2023-01-04 11:56:11.000000000 +0100
4
- @@ -1094,6 +1094,8 @@
1
+ diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
2
+ index 7eb55e2..76d4857 100644
3
+ --- a/Cython/Build/Dependencies.py
4
+ +++ b/Cython/Build/Dependencies.py
5
+ @@ -1094,6 +1094,8 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
5
6
progress = progress_fmt.format(i+1, N)
6
7
to_compile[i] = to_compile[i][1:] + (progress,)
7
8
@@ -10,10 +11,11 @@ diff -u -r a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
10
11
if N <= 1:
11
12
nthreads = 0
12
13
if nthreads:
13
- diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
14
- --- a/Cython/Compiler/Builtin.py 2023-01-04 11:56:12.000000000 +0100
15
- +++ b/Cython/Compiler/Builtin.py 2023-01-04 11:56:11.000000000 +0100
16
- @@ -51,11 +51,12 @@
14
+ diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
15
+ index e0d203a..22bd406 100644
16
+ --- a/Cython/Compiler/Builtin.py
17
+ +++ b/Cython/Compiler/Builtin.py
18
+ @@ -51,11 +51,12 @@ class _BuiltinOverride(object):
17
19
18
20
19
21
class BuiltinAttribute(object):
@@ -27,7 +29,7 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
27
29
28
30
def declare_in_type(self, self_type):
29
31
if self.field_type_name is not None:
30
- @@ -63,7 +64,7 @@
32
+ @@ -63,7 +64,7 @@ class BuiltinAttribute(object):
31
33
field_type = builtin_scope.lookup(self.field_type_name).type
32
34
else:
33
35
field_type = self.field_type or PyrexTypes.py_object_type
@@ -36,7 +38,7 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
36
38
entry.is_variable = True
37
39
38
40
39
- @@ -316,9 +317,9 @@
41
+ @@ -316,9 +317,9 @@ builtin_types_table = [
40
42
utility_code=UtilityCode.load("py_dict_clear", "Optimize.c")),
41
43
BuiltinMethod("copy", "T", "T", "PyDict_Copy")]),
42
44
@@ -49,10 +51,11 @@ diff -u -r a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py
49
51
]),
50
52
# ("file", "PyFile_Type", []), # not in Py3
51
53
52
- diff -u -r a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
53
- --- a/Cython/Compiler/ExprNodes.py 2023-01-04 11:56:12.000000000 +0100
54
- +++ b/Cython/Compiler/ExprNodes.py 2023-01-04 11:56:11.000000000 +0100
55
- @@ -7208,6 +7208,8 @@
54
+ diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
55
+ index 2c5d709..5827fe1 100644
56
+ --- a/Cython/Compiler/ExprNodes.py
57
+ +++ b/Cython/Compiler/ExprNodes.py
58
+ @@ -7208,6 +7208,8 @@ class AttributeNode(ExprNode):
56
59
if obj.type.is_builtin_type and self.entry and self.entry.is_variable:
57
60
# accessing a field of a builtin type, need to cast better than result_as() does
58
61
obj_code = obj.type.cast_code(obj.result(), to_object_struct = True)
@@ -61,18 +64,19 @@ diff -u -r a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
61
64
return "%s%s%s" % (obj_code, self.op, self.member)
62
65
63
66
def generate_result_code(self, code):
64
- diff -u -r a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
65
- --- a/Cython/Compiler/Symtab.py 2023-01-04 11:56:12.000000000 +0100
66
- +++ b/Cython/Compiler/Symtab.py 2023-01-04 11:56:11.000000000 +0100
67
- @@ -203,6 +203,7 @@
67
+ diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
68
+ index 7361a55..6c4d9d9 100644
69
+ --- a/Cython/Compiler/Symtab.py
70
+ +++ b/Cython/Compiler/Symtab.py
71
+ @@ -203,6 +203,7 @@ class Entry(object):
68
72
error_on_uninitialized = False
69
73
cf_used = True
70
74
outer_entry = None
71
75
+ getter = None
72
76
73
77
def __init__(self, name, cname, type, pos = None, init = None):
74
78
self.name = name
75
- @@ -436,7 +437,7 @@
79
+ @@ -436,7 +437,7 @@ class Scope(object):
76
80
for scope in sorted(self.subscopes, key=operator.attrgetter('scope_prefix')):
77
81
yield scope
78
82
@@ -81,18 +85,19 @@ diff -u -r a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
81
85
# Create new entry, and add to dictionary if
82
86
# name is not None. Reports a warning if already
83
87
# declared.
84
- @@ -475,6 +476,7 @@
88
+ @@ -475,6 +476,7 @@ class Scope(object):
85
89
error(pos, "'%s' redeclared " % name)
86
90
entries[name].already_declared_here()
87
91
entry = Entry(name, cname, type, pos = pos)
88
92
+ entry.getter = getter
89
93
entry.in_cinclude = self.in_cinclude
90
94
entry.create_wrapper = create_wrapper
91
95
if name:
92
- diff -u -r a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.pxd
93
- --- a/Cython/Includes/cpython/slice.pxd 2023-01-04 11:56:12.000000000 +0100
94
- +++ b/Cython/Includes/cpython/slice.pxd 2023-01-04 11:56:11.000000000 +0100
95
- @@ -48,6 +48,13 @@
96
+ diff --git a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.pxd
97
+ index 202dea7..1e83e66 100644
98
+ --- a/Cython/Includes/cpython/slice.pxd
99
+ +++ b/Cython/Includes/cpython/slice.pxd
100
+ @@ -48,6 +48,13 @@ cdef extern from "Python.h":
96
101
97
102
int PySlice_Unpack(object slice, Py_ssize_t *start, Py_ssize_t *stop,
98
103
Py_ssize_t *step) except -1
@@ -106,10 +111,24 @@ diff -u -r a/Cython/Includes/cpython/slice.pxd b/Cython/Includes/cpython/slice.p
106
111
# Extract the start, stop and step data members from a slice object as C
107
112
# integers. Silently reduce values larger than PY_SSIZE_T_MAX to
108
113
# PY_SSIZE_T_MAX, silently boost the start and stop values less than
109
- diff -u -r a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
110
- --- a/Cython/Utility/CythonFunction.c 2023-01-04 11:56:12.000000000 +0100
111
- +++ b/Cython/Utility/CythonFunction.c 2023-01-04 11:56:11.000000000 +0100
112
- @@ -1324,9 +1324,9 @@
114
+ diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c
115
+ index 1ad27df..0965cb2 100644
116
+ --- a/Cython/Utility/Coroutine.c
117
+ +++ b/Cython/Utility/Coroutine.c
118
+ @@ -1299,7 +1299,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
119
+ _Py_NewReference(self);
120
+ __Pyx_SET_REFCNT(self, refcnt);
121
+ }
122
+ - #if CYTHON_COMPILING_IN_CPYTHON
123
+ + #if CYTHON_COMPILING_IN_CPYTHON && !GRAALVM_PYTHON
124
+ assert(PyType_IS_GC(Py_TYPE(self)) &&
125
+ _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
126
+
127
+ diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
128
+ index b2c67dc..ad80ca4 100644
129
+ --- a/Cython/Utility/CythonFunction.c
130
+ +++ b/Cython/Utility/CythonFunction.c
131
+ @@ -1324,9 +1324,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
113
132
#if PY_VERSION_HEX < 0x03020000
114
133
PyTypeObject *d_type = descr->d_type;
115
134
#else
@@ -121,10 +140,20 @@ diff -u -r a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
121
140
}
122
141
#endif
123
142
else if (PyMethod_Check(method)) {
124
- diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
125
- --- a/Cython/Utility/ModuleSetupCode.c 2023-01-04 11:56:12.000000000 +0100
126
- +++ b/Cython/Utility/ModuleSetupCode.c 2023-01-04 11:56:11.000000000 +0100
127
- @@ -591,7 +591,7 @@
143
+ diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
144
+ index f8bf885..62fec57 100644
145
+ --- a/Cython/Utility/ModuleSetupCode.c
146
+ +++ b/Cython/Utility/ModuleSetupCode.c
147
+ @@ -265,6 +265,8 @@
148
+ #endif
149
+ #endif
150
+
151
+ + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
152
+ +
153
+ #if !defined(CYTHON_FAST_PYCCALL)
154
+ #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
155
+ #endif
156
+ @@ -591,7 +593,7 @@ class __Pyx_FakeReference {
128
157
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
129
158
#else
130
159
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
@@ -133,7 +162,7 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
133
162
#endif
134
163
135
164
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
136
- @@ -767,7 +767 ,7 @@
165
+ @@ -767,7 +769 ,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
137
166
#endif
138
167
139
168
@@ -142,7 +171,7 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
142
171
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
143
172
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
144
173
#else
145
- @@ -1076,7 +1076 ,7 @@
174
+ @@ -1076,7 +1078 ,7 @@ PyEval_InitThreads();
146
175
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
147
176
#if PY_VERSION_HEX >= 0x030700A1
148
177
static PY_INT64_T main_interpreter_id = -1;
@@ -151,10 +180,11 @@ diff -u -r a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
151
180
if (main_interpreter_id == -1) {
152
181
main_interpreter_id = current_id;
153
182
return (unlikely(current_id == -1)) ? -1 : 0;
154
- diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
155
- --- a/Cython/Utility/ObjectHandling.c 2023-01-04 11:56:12.000000000 +0100
156
- +++ b/Cython/Utility/ObjectHandling.c 2023-01-04 11:56:11.000000000 +0100
157
- @@ -717,7 +717,7 @@
183
+ diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
184
+ index 864b658..119f363 100644
185
+ --- a/Cython/Utility/ObjectHandling.c
186
+ +++ b/Cython/Utility/ObjectHandling.c
187
+ @@ -717,7 +717,7 @@ bad:
158
188
159
189
/////////////// SliceTupleAndList.proto ///////////////
160
190
@@ -163,7 +193,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
163
193
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
164
194
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
165
195
#else
166
- @@ -727,7 +727,7 @@
196
+ @@ -727,7 +727,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t
167
197
168
198
/////////////// SliceTupleAndList ///////////////
169
199
@@ -172,7 +202,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
172
202
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
173
203
Py_ssize_t start = *_start, stop = *_stop, length = *_length;
174
204
if (start < 0) {
175
- @@ -1152,7 +1152,7 @@
205
+ @@ -1152,7 +1152,7 @@ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
176
206
177
207
/////////////// SetNameInClass.proto ///////////////
178
208
@@ -181,7 +211,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
181
211
// Identifier names are always interned and have a pre-calculated hash value.
182
212
#define __Pyx_SetNameInClass(ns, name, value) \
183
213
(likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
184
- @@ -1201,7 +1201,7 @@
214
+ @@ -1201,7 +1201,7 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
185
215
{
186
216
PyObject *result;
187
217
#if !CYTHON_AVOID_BORROWED_REFS
@@ -190,7 +220,7 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
190
220
// Identifier names are always interned and have a pre-calculated hash value.
191
221
result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash);
192
222
__PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version)
193
- @@ -1592,8 +1592,8 @@
223
+ @@ -1592,8 +1592,8 @@ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
194
224
#endif
195
225
{
196
226
PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
@@ -201,10 +231,11 @@ diff -u -r a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
201
231
}
202
232
#endif
203
233
return 0;
204
- diff -u -r a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
205
- --- a/Cython/Utility/StringTools.c 2023-01-04 11:56:12.000000000 +0100
206
- +++ b/Cython/Utility/StringTools.c 2023-01-04 11:56:11.000000000 +0100
207
- @@ -183,7 +183,7 @@
234
+ diff --git a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
235
+ index 98b5e26..0f44675 100644
236
+ --- a/Cython/Utility/StringTools.c
237
+ +++ b/Cython/Utility/StringTools.c
238
+ @@ -183,7 +183,7 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
208
239
//@requires: BytesEquals
209
240
210
241
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
@@ -213,7 +244,7 @@ diff -u -r a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c
213
244
return PyObject_RichCompareBool(s1, s2, equals);
214
245
#else
215
246
#if PY_MAJOR_VERSION < 3
216
- @@ -294,7 +294,7 @@
247
+ @@ -294,7 +294,7 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq
217
248
//@requires: IncludeStringH
218
249
219
250
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
0 commit comments