Eliminate unnecessary custom object allocation functions
- these are just calling python defaults, no point at all...
This commit is contained in:
parent
ca6591e86c
commit
43f585fced
|
@ -517,17 +517,6 @@ fprintf(stderr, "%p -- ds %p\n", s, s->ds);
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmds_alloc(PyTypeObject * subtype, int nitems)
|
||||
{
|
||||
PyObject * s = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_rpmds_debug < 0)
|
||||
fprintf(stderr, "*** rpmds_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
||||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmds_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
|
@ -591,7 +580,7 @@ PyTypeObject rpmds_Type = {
|
|||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rpmds_init, /* tp_init */
|
||||
(allocfunc) rpmds_alloc, /* tp_alloc */
|
||||
0, /* tp_alloc */
|
||||
(newfunc) rpmds_new, /* tp_new */
|
||||
(freefunc) rpmds_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
|
|
|
@ -409,17 +409,6 @@ fprintf(stderr, "%p -- fi %p\n", s, s->fi);
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmfi_alloc(PyTypeObject * subtype, int nitems)
|
||||
{
|
||||
PyObject * s = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_rpmfi_debug < 0)
|
||||
fprintf(stderr, "*** rpmfi_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
||||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmfi_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
|
@ -482,7 +471,7 @@ PyTypeObject rpmfi_Type = {
|
|||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rpmfi_init, /* tp_init */
|
||||
(allocfunc) rpmfi_alloc, /* tp_alloc */
|
||||
0, /* tp_alloc */
|
||||
(newfunc) rpmfi_new, /* tp_new */
|
||||
(freefunc) rpmfi_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
|
|
|
@ -190,17 +190,6 @@ fprintf(stderr, "%p -- ps %p\n", s, s->ps);
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmps_alloc(PyTypeObject * subtype, int nitems)
|
||||
{
|
||||
PyObject * s = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_rpmps_debug < 0)
|
||||
fprintf(stderr, "*** rpmps_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
||||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmps_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
|
@ -263,7 +252,7 @@ PyTypeObject rpmps_Type = {
|
|||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rpmps_init, /* tp_init */
|
||||
(allocfunc) rpmps_alloc, /* tp_alloc */
|
||||
0, /* tp_alloc */
|
||||
(newfunc) rpmps_new, /* tp_new */
|
||||
(freefunc) rpmps_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
|
|
|
@ -1286,17 +1286,6 @@ fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts));
|
|||
PyObject_Del((PyObject *)s);
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_alloc(PyTypeObject * subtype, int nitems)
|
||||
{
|
||||
PyObject * s = PyType_GenericAlloc(subtype, nitems);
|
||||
|
||||
if (_rpmts_debug < 0)
|
||||
fprintf(stderr, "*** rpmts_alloc(%p,%d) ret %p\n", subtype, nitems, s);
|
||||
return s;
|
||||
}
|
||||
|
||||
/** \ingroup py_c
|
||||
*/
|
||||
static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds)
|
||||
|
@ -1376,7 +1365,7 @@ PyTypeObject rpmts_Type = {
|
|||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc) rpmts_init, /* tp_init */
|
||||
(allocfunc) rpmts_alloc, /* tp_alloc */
|
||||
0, /* tp_alloc */
|
||||
(newfunc) rpmts_new, /* tp_new */
|
||||
(freefunc) rpmts_free, /* tp_free */
|
||||
0, /* tp_is_gc */
|
||||
|
|
Loading…
Reference in New Issue