@@ -234,48 +234,28 @@ boolean hasNativeType() {
234
234
Object getNativeType (
235
235
@ CachedLibrary ("this" ) PythonNativeWrapperLibrary lib ,
236
236
@ CachedLibrary (limit = "3" ) PythonObjectLibrary plib ,
237
- @ Cached GetSulongTypeNode getSulongTypeNode , @ Exclusive @ Cached GilNode gil ) {
238
- boolean mustRelease = gil .acquire ();
239
- try {
240
- return getSulongTypeNode .execute (plib .getLazyPythonClass (lib .getDelegate (this )));
241
- } finally {
242
- gil .release (mustRelease );
243
- }
237
+ @ Cached GetSulongTypeNode getSulongTypeNode ) {
238
+ return getSulongTypeNode .execute (plib .getLazyPythonClass (lib .getDelegate (this )));
244
239
}
245
240
246
241
@ ExportMessage
247
242
boolean isPointer (
248
- @ Cached IsPointerNode isPointerNode , @ Exclusive @ Cached GilNode gil ) {
249
- boolean mustRelease = gil .acquire ();
250
- try {
251
- return isPointerNode .execute (this );
252
- } finally {
253
- gil .release (mustRelease );
254
- }
243
+ @ Cached IsPointerNode isPointerNode ) {
244
+ return isPointerNode .execute (this );
255
245
}
256
246
257
247
@ ExportMessage
258
248
long asPointer (
259
- @ Exclusive @ Cached PAsPointerNode pAsPointerNode , @ Exclusive @ Cached GilNode gil ) {
260
- boolean mustRelease = gil .acquire ();
261
- try {
262
- return pAsPointerNode .execute (this );
263
- } finally {
264
- gil .release (mustRelease );
265
- }
249
+ @ Exclusive @ Cached PAsPointerNode pAsPointerNode ) {
250
+ return pAsPointerNode .execute (this );
266
251
}
267
252
268
253
@ ExportMessage
269
254
void toNative (
270
255
@ Exclusive @ Cached ToPyObjectNode toPyObjectNode ,
271
- @ Exclusive @ Cached InvalidateNativeObjectsAllManagedNode invalidateNode , @ Exclusive @ Cached GilNode gil ) {
272
- boolean mustRelease = gil .acquire ();
273
- try {
274
- invalidateNode .execute ();
275
- setNativePointer (toPyObjectNode .execute (this ));
276
- } finally {
277
- gil .release (mustRelease );
278
- }
256
+ @ Exclusive @ Cached InvalidateNativeObjectsAllManagedNode invalidateNode ) {
257
+ invalidateNode .execute ();
258
+ setNativePointer (toPyObjectNode .execute (this ));
279
259
}
280
260
281
261
}
0 commit comments