diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-30 16:45:46 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-30 16:45:46 +0300 |
commit | 909982b1b5d2bccbf28ecfb38064ab86e09d4523 (patch) | |
tree | 7a8c2bf5841d1fff1de576a13a9ae7111c0c785e /python/rpmds-py.c | |
parent | 8cb920eb32f36297e2154b7ebcc25851d9a7b39d (diff) | |
download | librpm-tizen-909982b1b5d2bccbf28ecfb38064ab86e09d4523.tar.gz librpm-tizen-909982b1b5d2bccbf28ecfb38064ab86e09d4523.tar.bz2 librpm-tizen-909982b1b5d2bccbf28ecfb38064ab86e09d4523.zip |
Deprecate custom foo.count() methods, support len() instead
Diffstat (limited to 'python/rpmds-py.c')
-rw-r--r-- | python/rpmds-py.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/rpmds-py.c b/python/rpmds-py.c index 67904ba9a..7ad9fd4ad 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -63,7 +63,8 @@ void rpmds_ParseEVR(char * evr, static PyObject * rpmds_Count(rpmdsObject * s) { - return Py_BuildValue("i", rpmdsCount(s->ds)); + DEPRECATED_METHOD; + return Py_BuildValue("i", PyDict_Size((PyObject *)s)); } static PyObject * @@ -383,8 +384,7 @@ rpmds_dealloc(rpmdsObject * s) s->ob_type->tp_free((PyObject *)s); } -static int -rpmds_length(rpmdsObject * s) +static Py_ssize_t rpmds_length(rpmdsObject * s) { return rpmdsCount(s->ds); } |