@@ -59,10 +59,11 @@ PyObject *
59
59
PyRuby_New (VALUE ruby_object )
60
60
{
61
61
if (!ruby_thread_has_gvl_p ()) {
62
- CALL_WITH_GVL (PyRuby_New_impl , ruby_object );
62
+ return CALL_WITH_GVL (PyRuby_New_impl , ruby_object );
63
+ }
64
+ else {
65
+ return PyRuby_New_impl (ruby_object );
63
66
}
64
-
65
- return PyRuby_New_impl (ruby_object );
66
67
}
67
68
68
69
static void *
@@ -90,7 +91,9 @@ PyRuby_dealloc_with_gvl(PyRubyObject *pyro)
90
91
if (!ruby_thread_has_gvl_p ()) {
91
92
CALL_WITH_GVL (PyRuby_dealloc , pyro );
92
93
}
93
- PyRuby_dealloc (pyro );
94
+ else {
95
+ PyRuby_dealloc (pyro );
96
+ }
94
97
}
95
98
96
99
static PyObject *
@@ -114,7 +117,9 @@ PyRuby_repr_with_gvl(PyRubyObject *pyro)
114
117
if (!ruby_thread_has_gvl_p ()) {
115
118
return CALL_WITH_GVL (PyRuby_repr , pyro );
116
119
}
117
- return PyRuby_repr (pyro );
120
+ else {
121
+ return PyRuby_repr (pyro );
122
+ }
118
123
}
119
124
120
125
#if SIZEOF_SSIZE_T < 8
@@ -154,7 +159,9 @@ PyRuby_hash_long_with_gvl(PyRubyObject *pyro)
154
159
if (!ruby_thread_has_gvl_p ()) {
155
160
return (long )(intptr_t )CALL_WITH_GVL (PyRuby_hash_long , pyro );
156
161
}
157
- return (long )(intptr_t )PyRuby_hash_long (pyro );
162
+ else {
163
+ return (long )(intptr_t )PyRuby_hash_long (pyro );
164
+ }
158
165
}
159
166
160
167
static void *
@@ -185,7 +192,9 @@ PyRuby_hash_hash_t_with_gvl(PyRubyObject *pyro)
185
192
if (!ruby_thread_has_gvl_p ()) {
186
193
return (Py_hash_t )CALL_WITH_GVL (PyRuby_hash_hash_t , pyro );
187
194
}
188
- return (Py_hash_t )PyRuby_hash_hash_t (pyro );
195
+ else {
196
+ return (Py_hash_t )PyRuby_hash_hash_t (pyro );
197
+ }
189
198
}
190
199
191
200
struct call_rb_funcallv_params {
@@ -269,8 +278,9 @@ PyRuby_call_with_gvl(PyRubyObject *pyro, PyObject *pyobj_args, PyObject *pyobj_k
269
278
if (!ruby_thread_has_gvl_p ()) {
270
279
return CALL_WITH_GVL (PyRuby_call , & params );
271
280
}
272
-
273
- return PyRuby_call (& params );
281
+ else {
282
+ return PyRuby_call (& params );
283
+ }
274
284
}
275
285
276
286
struct PyRuby_getattro_params {
@@ -348,8 +358,9 @@ PyRuby_getattro_with_gvl(PyRubyObject *pyro, PyObject *pyobj_name)
348
358
if (!ruby_thread_has_gvl_p ()) {
349
359
return CALL_WITH_GVL (PyRuby_getattro , & params );
350
360
}
351
-
352
- return PyRuby_getattro (& params );
361
+ else {
362
+ return PyRuby_getattro (& params );
363
+ }
353
364
}
354
365
355
366
/* ==== PyCall::PyRubyPtr ==== */
0 commit comments