Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f955784

Browse files
committed
Regenerated with inheritance-aware xxxx_Check() macros.
1 parent 5bb2f64 commit f955784

22 files changed

Lines changed: 50 additions & 50 deletions

Mac/Modules/ae/_AEmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static PyObject *AE_Error;
6565

6666
PyTypeObject AEDesc_Type;
6767

68-
#define AEDesc_Check(x) ((x)->ob_type == &AEDesc_Type)
68+
#define AEDesc_Check(x) ((x)->ob_type == &AEDesc_Type || PyObject_TypeCheck((x), &AEDesc_Type))
6969

7070
typedef struct AEDescObject {
7171
PyObject_HEAD

Mac/Modules/app/_Appmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static PyObject *App_Error;
4040

4141
PyTypeObject ThemeDrawingState_Type;
4242

43-
#define ThemeDrawingStateObj_Check(x) ((x)->ob_type == &ThemeDrawingState_Type)
43+
#define ThemeDrawingStateObj_Check(x) ((x)->ob_type == &ThemeDrawingState_Type || PyObject_TypeCheck((x), &ThemeDrawingState_Type))
4444

4545
typedef struct ThemeDrawingStateObject {
4646
PyObject_HEAD

Mac/Modules/carbonevt/_CarbonEvtmodule.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static PyObject *CarbonEvents_Error;
142142

143143
PyTypeObject EventRef_Type;
144144

145-
#define EventRef_Check(x) ((x)->ob_type == &EventRef_Type)
145+
#define EventRef_Check(x) ((x)->ob_type == &EventRef_Type || PyObject_TypeCheck((x), &EventRef_Type))
146146

147147
typedef struct EventRefObject {
148148
PyObject_HEAD
@@ -486,7 +486,7 @@ PyTypeObject EventRef_Type = {
486486

487487
PyTypeObject EventQueueRef_Type;
488488

489-
#define EventQueueRef_Check(x) ((x)->ob_type == &EventQueueRef_Type)
489+
#define EventQueueRef_Check(x) ((x)->ob_type == &EventQueueRef_Type || PyObject_TypeCheck((x), &EventQueueRef_Type))
490490

491491
typedef struct EventQueueRefObject {
492492
PyObject_HEAD
@@ -706,7 +706,7 @@ PyTypeObject EventQueueRef_Type = {
706706

707707
PyTypeObject EventLoopRef_Type;
708708

709-
#define EventLoopRef_Check(x) ((x)->ob_type == &EventLoopRef_Type)
709+
#define EventLoopRef_Check(x) ((x)->ob_type == &EventLoopRef_Type || PyObject_TypeCheck((x), &EventLoopRef_Type))
710710

711711
typedef struct EventLoopRefObject {
712712
PyObject_HEAD
@@ -835,7 +835,7 @@ PyTypeObject EventLoopRef_Type = {
835835

836836
PyTypeObject EventLoopTimerRef_Type;
837837

838-
#define EventLoopTimerRef_Check(x) ((x)->ob_type == &EventLoopTimerRef_Type)
838+
#define EventLoopTimerRef_Check(x) ((x)->ob_type == &EventLoopTimerRef_Type || PyObject_TypeCheck((x), &EventLoopTimerRef_Type))
839839

840840
typedef struct EventLoopTimerRefObject {
841841
PyObject_HEAD
@@ -982,7 +982,7 @@ PyTypeObject EventLoopTimerRef_Type = {
982982

983983
PyTypeObject EventHandlerRef_Type;
984984

985-
#define EventHandlerRef_Check(x) ((x)->ob_type == &EventHandlerRef_Type)
985+
#define EventHandlerRef_Check(x) ((x)->ob_type == &EventHandlerRef_Type || PyObject_TypeCheck((x), &EventHandlerRef_Type))
986986

987987
typedef struct EventHandlerRefObject {
988988
PyObject_HEAD
@@ -1174,7 +1174,7 @@ PyTypeObject EventHandlerRef_Type = {
11741174

11751175
PyTypeObject EventHandlerCallRef_Type;
11761176

1177-
#define EventHandlerCallRef_Check(x) ((x)->ob_type == &EventHandlerCallRef_Type)
1177+
#define EventHandlerCallRef_Check(x) ((x)->ob_type == &EventHandlerCallRef_Type || PyObject_TypeCheck((x), &EventHandlerCallRef_Type))
11781178

11791179
typedef struct EventHandlerCallRefObject {
11801180
PyObject_HEAD
@@ -1306,7 +1306,7 @@ PyTypeObject EventHandlerCallRef_Type = {
13061306

13071307
PyTypeObject EventTargetRef_Type;
13081308

1309-
#define EventTargetRef_Check(x) ((x)->ob_type == &EventTargetRef_Type)
1309+
#define EventTargetRef_Check(x) ((x)->ob_type == &EventTargetRef_Type || PyObject_TypeCheck((x), &EventTargetRef_Type))
13101310

13111311
typedef struct EventTargetRefObject {
13121312
PyObject_HEAD
@@ -1460,7 +1460,7 @@ PyTypeObject EventTargetRef_Type = {
14601460

14611461
PyTypeObject EventHotKeyRef_Type;
14621462

1463-
#define EventHotKeyRef_Check(x) ((x)->ob_type == &EventHotKeyRef_Type)
1463+
#define EventHotKeyRef_Check(x) ((x)->ob_type == &EventHotKeyRef_Type || PyObject_TypeCheck((x), &EventHotKeyRef_Type))
14641464

14651465
typedef struct EventHotKeyRefObject {
14661466
PyObject_HEAD

Mac/Modules/cf/_CFmodule.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static PyObject *CF_Error;
128128

129129
PyTypeObject CFTypeRef_Type;
130130

131-
#define CFTypeRefObj_Check(x) ((x)->ob_type == &CFTypeRef_Type)
131+
#define CFTypeRefObj_Check(x) ((x)->ob_type == &CFTypeRef_Type || PyObject_TypeCheck((x), &CFTypeRef_Type))
132132

133133
typedef struct CFTypeRefObject {
134134
PyObject_HEAD
@@ -442,7 +442,7 @@ PyTypeObject CFTypeRef_Type = {
442442

443443
PyTypeObject CFArrayRef_Type;
444444

445-
#define CFArrayRefObj_Check(x) ((x)->ob_type == &CFArrayRef_Type)
445+
#define CFArrayRefObj_Check(x) ((x)->ob_type == &CFArrayRef_Type || PyObject_TypeCheck((x), &CFArrayRef_Type))
446446

447447
typedef struct CFArrayRefObject {
448448
PyObject_HEAD
@@ -598,7 +598,7 @@ PyTypeObject CFArrayRef_Type = {
598598

599599
PyTypeObject CFMutableArrayRef_Type;
600600

601-
#define CFMutableArrayRefObj_Check(x) ((x)->ob_type == &CFMutableArrayRef_Type)
601+
#define CFMutableArrayRefObj_Check(x) ((x)->ob_type == &CFMutableArrayRef_Type || PyObject_TypeCheck((x), &CFMutableArrayRef_Type))
602602

603603
typedef struct CFMutableArrayRefObject {
604604
PyObject_HEAD
@@ -783,7 +783,7 @@ PyTypeObject CFMutableArrayRef_Type = {
783783

784784
PyTypeObject CFDictionaryRef_Type;
785785

786-
#define CFDictionaryRefObj_Check(x) ((x)->ob_type == &CFDictionaryRef_Type)
786+
#define CFDictionaryRefObj_Check(x) ((x)->ob_type == &CFDictionaryRef_Type || PyObject_TypeCheck((x), &CFDictionaryRef_Type))
787787

788788
typedef struct CFDictionaryRefObject {
789789
PyObject_HEAD
@@ -921,7 +921,7 @@ PyTypeObject CFDictionaryRef_Type = {
921921

922922
PyTypeObject CFMutableDictionaryRef_Type;
923923

924-
#define CFMutableDictionaryRefObj_Check(x) ((x)->ob_type == &CFMutableDictionaryRef_Type)
924+
#define CFMutableDictionaryRefObj_Check(x) ((x)->ob_type == &CFMutableDictionaryRef_Type || PyObject_TypeCheck((x), &CFMutableDictionaryRef_Type))
925925

926926
typedef struct CFMutableDictionaryRefObject {
927927
PyObject_HEAD
@@ -1043,7 +1043,7 @@ PyTypeObject CFMutableDictionaryRef_Type = {
10431043

10441044
PyTypeObject CFDataRef_Type;
10451045

1046-
#define CFDataRefObj_Check(x) ((x)->ob_type == &CFDataRef_Type)
1046+
#define CFDataRefObj_Check(x) ((x)->ob_type == &CFDataRef_Type || PyObject_TypeCheck((x), &CFDataRef_Type))
10471047

10481048
typedef struct CFDataRefObject {
10491049
PyObject_HEAD
@@ -1219,7 +1219,7 @@ PyTypeObject CFDataRef_Type = {
12191219

12201220
PyTypeObject CFMutableDataRef_Type;
12211221

1222-
#define CFMutableDataRefObj_Check(x) ((x)->ob_type == &CFMutableDataRef_Type)
1222+
#define CFMutableDataRefObj_Check(x) ((x)->ob_type == &CFMutableDataRef_Type || PyObject_TypeCheck((x), &CFMutableDataRef_Type))
12231223

12241224
typedef struct CFMutableDataRefObject {
12251225
PyObject_HEAD
@@ -1429,7 +1429,7 @@ PyTypeObject CFMutableDataRef_Type = {
14291429

14301430
PyTypeObject CFStringRef_Type;
14311431

1432-
#define CFStringRefObj_Check(x) ((x)->ob_type == &CFStringRef_Type)
1432+
#define CFStringRefObj_Check(x) ((x)->ob_type == &CFStringRef_Type || PyObject_TypeCheck((x), &CFStringRef_Type))
14331433

14341434
typedef struct CFStringRefObject {
14351435
PyObject_HEAD
@@ -2114,7 +2114,7 @@ PyTypeObject CFStringRef_Type = {
21142114

21152115
PyTypeObject CFMutableStringRef_Type;
21162116

2117-
#define CFMutableStringRefObj_Check(x) ((x)->ob_type == &CFMutableStringRef_Type)
2117+
#define CFMutableStringRefObj_Check(x) ((x)->ob_type == &CFMutableStringRef_Type || PyObject_TypeCheck((x), &CFMutableStringRef_Type))
21182118

21192119
typedef struct CFMutableStringRefObject {
21202120
PyObject_HEAD
@@ -2447,7 +2447,7 @@ PyTypeObject CFMutableStringRef_Type = {
24472447

24482448
PyTypeObject CFURLRef_Type;
24492449

2450-
#define CFURLRefObj_Check(x) ((x)->ob_type == &CFURLRef_Type)
2450+
#define CFURLRefObj_Check(x) ((x)->ob_type == &CFURLRef_Type || PyObject_TypeCheck((x), &CFURLRef_Type))
24512451

24522452
typedef struct CFURLRefObject {
24532453
PyObject_HEAD

Mac/Modules/cg/_CGmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static PyObject *CG_Error;
212212

213213
PyTypeObject CGContextRef_Type;
214214

215-
#define CGContextRefObj_Check(x) ((x)->ob_type == &CGContextRef_Type)
215+
#define CGContextRefObj_Check(x) ((x)->ob_type == &CGContextRef_Type || PyObject_TypeCheck((x), &CGContextRef_Type))
216216

217217
typedef struct CGContextRefObject {
218218
PyObject_HEAD

Mac/Modules/cm/_Cmmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static PyObject *Cm_Error;
6969

7070
PyTypeObject ComponentInstance_Type;
7171

72-
#define CmpInstObj_Check(x) ((x)->ob_type == &ComponentInstance_Type)
72+
#define CmpInstObj_Check(x) ((x)->ob_type == &ComponentInstance_Type || PyObject_TypeCheck((x), &ComponentInstance_Type))
7373

7474
typedef struct ComponentInstanceObject {
7575
PyObject_HEAD
@@ -335,7 +335,7 @@ PyTypeObject ComponentInstance_Type = {
335335

336336
PyTypeObject Component_Type;
337337

338-
#define CmpObj_Check(x) ((x)->ob_type == &Component_Type)
338+
#define CmpObj_Check(x) ((x)->ob_type == &Component_Type || PyObject_TypeCheck((x), &Component_Type))
339339

340340
typedef struct ComponentObject {
341341
PyObject_HEAD

Mac/Modules/ctl/_Ctlmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static PyObject *Ctl_Error;
145145

146146
PyTypeObject Control_Type;
147147

148-
#define CtlObj_Check(x) ((x)->ob_type == &Control_Type)
148+
#define CtlObj_Check(x) ((x)->ob_type == &Control_Type || PyObject_TypeCheck((x), &Control_Type))
149149

150150
typedef struct ControlObject {
151151
PyObject_HEAD

Mac/Modules/dlg/_Dlgmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static PyObject *Dlg_Error;
138138

139139
PyTypeObject Dialog_Type;
140140

141-
#define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type)
141+
#define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type || PyObject_TypeCheck((x), &Dialog_Type))
142142

143143
typedef struct DialogObject {
144144
PyObject_HEAD

Mac/Modules/drag/_Dragmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static PyObject *Drag_Error;
4949

5050
PyTypeObject DragObj_Type;
5151

52-
#define DragObj_Check(x) ((x)->ob_type == &DragObj_Type)
52+
#define DragObj_Check(x) ((x)->ob_type == &DragObj_Type || PyObject_TypeCheck((x), &DragObj_Type))
5353

5454
typedef struct DragObjObject {
5555
PyObject_HEAD

Mac/Modules/file/_Filemodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static PyObject *File_Error;
101101

102102
PyTypeObject Alias_Type;
103103

104-
#define Alias_Check(x) ((x)->ob_type == &Alias_Type)
104+
#define Alias_Check(x) ((x)->ob_type == &Alias_Type || PyObject_TypeCheck((x), &Alias_Type))
105105

106106
typedef struct AliasObject {
107107
PyObject_HEAD
@@ -447,7 +447,7 @@ PyTypeObject Alias_Type = {
447447

448448
PyTypeObject FSSpec_Type;
449449

450-
#define FSSpec_Check(x) ((x)->ob_type == &FSSpec_Type)
450+
#define FSSpec_Check(x) ((x)->ob_type == &FSSpec_Type || PyObject_TypeCheck((x), &FSSpec_Type))
451451

452452
typedef struct FSSpecObject {
453453
PyObject_HEAD
@@ -916,7 +916,7 @@ PyTypeObject FSSpec_Type = {
916916

917917
PyTypeObject FSRef_Type;
918918

919-
#define FSRef_Check(x) ((x)->ob_type == &FSRef_Type)
919+
#define FSRef_Check(x) ((x)->ob_type == &FSRef_Type || PyObject_TypeCheck((x), &FSRef_Type))
920920

921921
typedef struct FSRefObject {
922922
PyObject_HEAD

0 commit comments

Comments
 (0)