File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2463,14 +2463,14 @@ MyObject_dealloc(PyObject *op)
24632463 Py_TYPE (op )-> tp_free (op );
24642464}
24652465
2466- static PyTypeObject MyType ;
2466+ static PyTypeObject TryIncrefType ;
24672467
24682468static PyObject *
24692469test_try_incref (PyObject * Py_UNUSED (module ), PyObject * Py_UNUSED (args ))
24702470{
24712471 MyObject_dealloc_called = 0 ;
24722472
2473- PyObject * obj = PyObject_New (PyObject , & MyType );
2473+ PyObject * obj = PyObject_New (PyObject , & TryIncrefType );
24742474 if (obj == _Py_NULL ) {
24752475 return _Py_NULL ;
24762476 }
@@ -2573,11 +2573,11 @@ module_exec(PyObject *module)
25732573 return -1 ;
25742574 }
25752575#endif
2576- MyType .tp_name = "MyType " ;
2577- MyType .tp_basicsize = sizeof (PyObject );
2578- MyType .tp_dealloc = MyObject_dealloc ;
2579- MyType .tp_free = PyObject_Del ;
2580- if (PyType_Ready (& MyType ) < 0 ) {
2576+ TryIncrefType .tp_name = "TryIncrefType " ;
2577+ TryIncrefType .tp_basicsize = sizeof (PyObject );
2578+ TryIncrefType .tp_dealloc = MyObject_dealloc ;
2579+ TryIncrefType .tp_free = PyObject_Del ;
2580+ if (PyType_Ready (& TryIncrefType ) < 0 ) {
25812581 return -1 ;
25822582 }
25832583 return 0 ;
You can’t perform that action at this time.
0 commit comments