File tree 3 files changed +30
-22
lines changed
3 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ static int Admin_clear (Handle *self) {
40
40
static void Admin_dealloc (Handle * self ) {
41
41
PyObject_GC_UnTrack (self );
42
42
43
- Admin_clear (self );
44
-
45
43
if (self -> rk ) {
46
44
CallState cs ;
47
45
CallState_begin (self , & cs );
@@ -51,6 +49,8 @@ static void Admin_dealloc (Handle *self) {
51
49
CallState_end (self , & cs );
52
50
}
53
51
52
+ Admin_clear (self );
53
+
54
54
Py_TYPE (self )-> tp_free ((PyObject * )self );
55
55
}
56
56
Original file line number Diff line number Diff line change 28
28
****************************************************************************/
29
29
30
30
31
- static int Consumer_clear (Handle * self ) {
31
+ static void Consumer_clear0 (Handle * self ) {
32
32
if (self -> u .Consumer .on_assign ) {
33
33
Py_DECREF (self -> u .Consumer .on_assign );
34
34
self -> u .Consumer .on_assign = NULL ;
@@ -45,18 +45,20 @@ static int Consumer_clear (Handle *self) {
45
45
rd_kafka_queue_destroy (self -> u .Consumer .rkqu );
46
46
self -> u .Consumer .rkqu = NULL ;
47
47
}
48
+ }
48
49
49
- Handle_clear (self );
50
-
51
- return 0 ;
50
+ static int Consumer_clear (Handle * self ) {
51
+ Consumer_clear0 (self );
52
+ Handle_clear (self );
53
+ return 0 ;
52
54
}
53
55
54
56
static void Consumer_dealloc (Handle * self ) {
55
57
PyObject_GC_UnTrack (self );
56
58
57
- Consumer_clear (self );
59
+ Consumer_clear0 (self );
58
60
59
- if (self -> rk ) {
61
+ if (self -> rk ) {
60
62
CallState cs ;
61
63
62
64
CallState_begin (self , & cs );
@@ -71,6 +73,8 @@ static void Consumer_dealloc (Handle *self) {
71
73
CallState_end (self , & cs );
72
74
}
73
75
76
+ Handle_clear (self );
77
+
74
78
Py_TYPE (self )-> tp_free ((PyObject * )self );
75
79
}
76
80
Original file line number Diff line number Diff line change @@ -88,27 +88,29 @@ Producer_msgstate_destroy (struct Producer_msgstate *msgstate) {
88
88
}
89
89
90
90
91
- static int Producer_clear (Handle * self ) {
92
- if (self -> u .Producer .default_dr_cb ) {
93
- Py_DECREF (self -> u .Producer .default_dr_cb );
94
- self -> u .Producer .default_dr_cb = NULL ;
95
- }
96
- if (self -> u .Producer .partitioner_cb ) {
97
- Py_DECREF (self -> u .Producer .partitioner_cb );
98
- self -> u .Producer .partitioner_cb = NULL ;
99
- }
100
-
101
- Handle_clear (self );
91
+ static void Producer_clear0 (Handle * self ) {
92
+ if (self -> u .Producer .default_dr_cb ) {
93
+ Py_DECREF (self -> u .Producer .default_dr_cb );
94
+ self -> u .Producer .default_dr_cb = NULL ;
95
+ }
96
+ if (self -> u .Producer .partitioner_cb ) {
97
+ Py_DECREF (self -> u .Producer .partitioner_cb );
98
+ self -> u .Producer .partitioner_cb = NULL ;
99
+ }
100
+ }
102
101
103
- return 0 ;
102
+ static int Producer_clear (Handle * self ) {
103
+ Producer_clear0 (self );
104
+ Handle_clear (self );
105
+ return 0 ;
104
106
}
105
107
106
108
static void Producer_dealloc (Handle * self ) {
107
109
PyObject_GC_UnTrack (self );
108
110
109
- Producer_clear (self );
111
+ Producer_clear0 (self );
110
112
111
- if (self -> rk ) {
113
+ if (self -> rk ) {
112
114
CallState cs ;
113
115
CallState_begin (self , & cs );
114
116
@@ -117,6 +119,8 @@ static void Producer_dealloc (Handle *self) {
117
119
CallState_end (self , & cs );
118
120
}
119
121
122
+ Handle_clear (self );
123
+
120
124
Py_TYPE (self )-> tp_free ((PyObject * )self );
121
125
}
122
126
You can’t perform that action at this time.
0 commit comments