File tree Expand file tree Collapse file tree 3 files changed +5
-21
lines changed Expand file tree Collapse file tree 3 files changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ cframe_dealloc(PyCFrameObject *cf)
49
49
free_list = cf ;
50
50
}
51
51
else
52
- PyObject_GC_Del ( cf );
52
+ Py_TYPE ( cf ) -> tp_free (( PyObject * ) cf );
53
53
}
54
54
55
55
static int
@@ -331,7 +331,7 @@ PyTypeObject PyCFrame_Type = {
331
331
0 , /* tp_init */
332
332
0 , /* tp_alloc */
333
333
cframe_new , /* tp_new */
334
- PyObject_Del , /* tp_free */
334
+ PyObject_GC_Del , /* tp_free */
335
335
};
336
336
337
337
int slp_init_cframetype (void )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ bomb_dealloc(PyBombObject *bomb)
29
29
free_list = bomb ;
30
30
}
31
31
else
32
- PyObject_GC_Del ( bomb );
32
+ Py_TYPE ( bomb ) -> tp_free (( PyObject * ) bomb );
33
33
}
34
34
35
35
static int
Original file line number Diff line number Diff line change @@ -41,15 +41,6 @@ typedef struct PyAtomicObject
41
41
int old ;
42
42
} PyAtomicObject ;
43
43
44
- static PyObject *
45
- atomic_new (PyTypeObject * type , PyObject * args , PyObject * kwds );
46
-
47
- static void
48
- atomic_dealloc (PyObject * self )
49
- {
50
- PyObject_DEL (self );
51
- }
52
-
53
44
static PyObject *
54
45
atomic_enter (PyObject * self )
55
46
{
@@ -90,7 +81,7 @@ PyTypeObject PyAtomic_Type = {
90
81
"_stackless.atomic" ,
91
82
sizeof (PyAtomicObject ),
92
83
0 ,
93
- atomic_dealloc , /* tp_dealloc */
84
+ 0 , /* tp_dealloc */
94
85
0 , /* tp_print */
95
86
0 , /* tp_getattr */
96
87
0 , /* tp_setattr */
@@ -123,16 +114,9 @@ PyTypeObject PyAtomic_Type = {
123
114
0 , /* tp_dictoffset */
124
115
0 , /* tp_init */
125
116
0 , /* tp_alloc */
126
- atomic_new , /* tp_new */
117
+ PyType_GenericNew , /* tp_new */
127
118
};
128
119
129
- static PyObject *
130
- atomic_new (PyTypeObject * type , PyObject * args , PyObject * kwds )
131
- {
132
- PyAtomicObject * a = PyObject_NEW (PyAtomicObject , & PyAtomic_Type );
133
- return (PyObject * )a ;
134
- }
135
-
136
120
/******************************************************
137
121
138
122
The Stackless Module
You can’t perform that action at this time.
0 commit comments