@@ -368,8 +368,9 @@ public virtual PyObject GetItem(PyObject key) {
368
368
/// </remarks>
369
369
370
370
public virtual PyObject GetItem ( string key ) {
371
- using ( PyString pyKey = new PyString ( key ) )
371
+ using ( PyString pyKey = new PyString ( key ) ) {
372
372
return GetItem ( pyKey ) ;
373
+ }
373
374
}
374
375
375
376
@@ -384,8 +385,9 @@ public virtual PyObject GetItem(string key) {
384
385
/// </remarks>
385
386
386
387
public virtual PyObject GetItem ( int index ) {
387
- PyInt key = new PyInt ( index ) ;
388
- return GetItem ( ( PyObject ) key ) ;
388
+ using ( PyInt key = new PyInt ( index ) ) {
389
+ return GetItem ( ( PyObject ) key ) ;
390
+ }
389
391
}
390
392
391
393
@@ -418,8 +420,9 @@ public virtual void SetItem(PyObject key, PyObject value) {
418
420
/// </remarks>
419
421
420
422
public virtual void SetItem ( string key , PyObject value ) {
421
- using ( PyString pyKey = new PyString ( key ) )
423
+ using ( PyString pyKey = new PyString ( key ) ) {
422
424
SetItem ( pyKey , value ) ;
425
+ }
423
426
}
424
427
425
428
@@ -469,8 +472,9 @@ public virtual void DelItem(PyObject key) {
469
472
/// </remarks>
470
473
471
474
public virtual void DelItem ( string key ) {
472
- using ( PyString pyKey = new PyString ( key ) )
475
+ using ( PyString pyKey = new PyString ( key ) ) {
473
476
DelItem ( pyKey ) ;
477
+ }
474
478
}
475
479
476
480
@@ -485,8 +489,9 @@ public virtual void DelItem(string key) {
485
489
/// </remarks>
486
490
487
491
public virtual void DelItem ( int index ) {
488
- using ( PyInt pyindex = new PyInt ( index ) )
492
+ using ( PyInt pyindex = new PyInt ( index ) ) {
489
493
DelItem ( pyindex ) ;
494
+ }
490
495
}
491
496
492
497
0 commit comments