File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -96,39 +96,33 @@ cdef inline run_in_context(context, method):
9696 # certain circumstances, inlined context.run() will not hold a reference to
9797 # the given method instance, which - if deallocated - will cause segfault.
9898 # See also: edgedb/edgedb#2222
99+ Context_Enter(context)
99100 Py_INCREF(method)
100101 try :
101- Context_Enter(context)
102- try :
103- return method()
104- finally :
105- Context_Exit(context)
102+ return method()
106103 finally :
107104 Py_DECREF(method)
105+ Context_Exit(context)
108106
109107
110108cdef inline run_in_context1(context, method, arg):
109+ Context_Enter(context)
111110 Py_INCREF(method)
112111 try :
113- Context_Enter(context)
114- try :
115- return method(arg)
116- finally :
117- Context_Exit(context)
112+ return method(arg)
118113 finally :
119114 Py_DECREF(method)
115+ Context_Exit(context)
120116
121117
122118cdef inline run_in_context2(context, method, arg1, arg2):
119+ Context_Enter(context)
123120 Py_INCREF(method)
124121 try :
125- Context_Enter(context)
126- try :
127- return method(arg1, arg2)
128- finally :
129- Context_Exit(context)
122+ return method(arg1, arg2)
130123 finally :
131124 Py_DECREF(method)
125+ Context_Exit(context)
132126
133127
134128# Used for deprecation and removal of `loop.create_datagram_endpoint()`'s
You can’t perform that action at this time.
0 commit comments