@@ -348,8 +348,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
348
348
[pool release ];
349
349
}
350
350
351
- Py_INCREF (Py_None);
352
- return Py_None;
351
+ Py_RETURN_NONE;
353
352
}
354
353
355
354
static PyObject*
@@ -362,8 +361,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
362
361
return NULL ;
363
362
}
364
363
[view setNeedsDisplay: YES ];
365
- Py_INCREF (Py_None);
366
- return Py_None;
364
+ Py_RETURN_NONE;
367
365
}
368
366
369
367
static PyObject*
@@ -376,8 +374,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
376
374
return NULL ;
377
375
}
378
376
[view displayIfNeeded ];
379
- Py_INCREF (Py_None);
380
- return Py_None;
377
+ Py_RETURN_NONE;
381
378
}
382
379
383
380
static PyObject*
@@ -420,8 +417,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
420
417
}
421
418
422
419
[view setRubberband: rubberband];
423
- Py_INCREF (Py_None);
424
- return Py_None;
420
+ Py_RETURN_NONE;
425
421
}
426
422
427
423
static PyObject*
@@ -434,8 +430,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
434
430
return NULL ;
435
431
}
436
432
[view removeRubberband ];
437
- Py_INCREF (Py_None);
438
- return Py_None;
433
+ Py_RETURN_NONE;
439
434
}
440
435
441
436
static NSImage * _read_ppm_image (PyObject* obj)
@@ -546,8 +541,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
546
541
if (error==0 ) close (channel[1 ]);
547
542
if (interrupted) raise (SIGINT);
548
543
549
- Py_INCREF (Py_None);
550
- return Py_None;
544
+ Py_RETURN_NONE;
551
545
}
552
546
553
547
static PyObject*
@@ -563,8 +557,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
563
557
data1: 0
564
558
data2: 0 ];
565
559
[NSApp postEvent: event atStart: true ];
566
- Py_INCREF (Py_None);
567
- return Py_None;
560
+ Py_RETURN_NONE;
568
561
}
569
562
570
563
static PyMethodDef FigureCanvas_methods[] = {
@@ -770,8 +763,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
770
763
[window orderFrontRegardless ];
771
764
[pool release ];
772
765
}
773
- Py_INCREF (Py_None);
774
- return Py_None;
766
+ Py_RETURN_NONE;
775
767
}
776
768
777
769
static PyObject*
@@ -785,8 +777,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
785
777
[pool release ];
786
778
self->window = NULL ;
787
779
}
788
- Py_INCREF (Py_None);
789
- return Py_None;
780
+ Py_RETURN_NONE;
790
781
}
791
782
792
783
static PyObject*
@@ -808,8 +799,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
808
799
[pool release ];
809
800
}
810
801
PyMem_Free (title);
811
- Py_INCREF (Py_None);
812
- return Py_None;
802
+ Py_RETURN_NONE;
813
803
}
814
804
815
805
static PyObject*
@@ -830,8 +820,7 @@ static CGFloat _get_device_scale(CGContextRef cr)
830
820
if (result) {
831
821
return result;
832
822
} else {
833
- Py_INCREF (Py_None);
834
- return Py_None;
823
+ Py_RETURN_NONE;
835
824
}
836
825
}
837
826
@@ -1280,8 +1269,7 @@ -(void)save_figure:(id)sender
1280
1269
[button setEnabled: YES ];
1281
1270
}
1282
1271
[pool release ];
1283
- Py_INCREF (Py_None);
1284
- return Py_None;
1272
+ Py_RETURN_NONE;
1285
1273
}
1286
1274
1287
1275
static PyObject*
@@ -1783,8 +1771,7 @@ -(void)save_figure:(id)sender
1783
1771
[pool release ];
1784
1772
}
1785
1773
1786
- Py_INCREF (Py_None);
1787
- return Py_None;
1774
+ Py_RETURN_NONE;
1788
1775
}
1789
1776
1790
1777
static PyMethodDef NavigationToolbar2_methods[] = {
@@ -1888,8 +1875,7 @@ -(void)save_figure:(id)sender
1888
1875
free (buffer);
1889
1876
return string;
1890
1877
}
1891
- Py_INCREF (Py_None);
1892
- return Py_None;
1878
+ Py_RETURN_NONE;
1893
1879
}
1894
1880
1895
1881
static PyObject*
@@ -1906,8 +1892,7 @@ -(void)save_figure:(id)sender
1906
1892
case 4 : break ;
1907
1893
default : return NULL ;
1908
1894
}
1909
- Py_INCREF (Py_None);
1910
- return Py_None;
1895
+ Py_RETURN_NONE;
1911
1896
}
1912
1897
1913
1898
@implementation WindowServerConnectionManager
@@ -2845,8 +2830,7 @@ - (int)index
2845
2830
Py_BEGIN_ALLOW_THREADS
2846
2831
[NSApp run ];
2847
2832
Py_END_ALLOW_THREADS
2848
- Py_INCREF (Py_None);
2849
- return Py_None;
2833
+ Py_RETURN_NONE;
2850
2834
}
2851
2835
2852
2836
typedef struct {
@@ -2971,8 +2955,7 @@ static void context_cleanup(const void* info)
2971
2955
* the timer lost before we have a chance to decrease the reference count
2972
2956
* of the attribute */
2973
2957
self->timer = timer;
2974
- Py_INCREF (Py_None);
2975
- return Py_None;
2958
+ Py_RETURN_NONE;
2976
2959
}
2977
2960
2978
2961
static PyObject*
@@ -2983,8 +2966,7 @@ static void context_cleanup(const void* info)
2983
2966
CFRelease (self->timer );
2984
2967
self->timer = NULL ;
2985
2968
}
2986
- Py_INCREF (Py_None);
2987
- return Py_None;
2969
+ Py_RETURN_NONE;
2988
2970
}
2989
2971
2990
2972
static void
0 commit comments