File tree 1 file changed +0
-10
lines changed
1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -92,36 +92,26 @@ cdef inline socket_dec_io_ref(sock):
92
92
93
93
94
94
cdef inline run_in_context(context, method):
95
- # This method is internally used to workaround a reference issue that in
96
- # certain circumstances, inlined context.run() will not hold a reference to
97
- # the given method instance, which - if deallocated - will cause segfault.
98
- # See also: edgedb/edgedb#2222
99
95
Context_Enter(context)
100
- Py_INCREF(method)
101
96
try :
102
97
return method()
103
98
finally :
104
- Py_DECREF(method)
105
99
Context_Exit(context)
106
100
107
101
108
102
cdef inline run_in_context1(context, method, arg):
109
103
Context_Enter(context)
110
- Py_INCREF(method)
111
104
try :
112
105
return method(arg)
113
106
finally :
114
- Py_DECREF(method)
115
107
Context_Exit(context)
116
108
117
109
118
110
cdef inline run_in_context2(context, method, arg1, arg2):
119
111
Context_Enter(context)
120
- Py_INCREF(method)
121
112
try :
122
113
return method(arg1, arg2)
123
114
finally :
124
- Py_DECREF(method)
125
115
Context_Exit(context)
126
116
127
117
You can’t perform that action at this time.
0 commit comments