Skip to content

Commit ac639f6

Browse files
committed
Rename MyType to TryIncrefType
1 parent 6240ab3 commit ac639f6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test_pythoncapi_compat_cext.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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

24682468
static PyObject*
24692469
test_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;

0 commit comments

Comments
 (0)