diff options
| author | Julian Andres Klode <jak@debian.org> | 2013-08-26 13:39:57 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2013-09-11 20:14:52 +0200 |
| commit | 044322b4dca1135671a93ebfe1601214f7f6e655 (patch) | |
| tree | 6b9ba04f4aab7f24bfead1da769aa6707140975c /python/cdrom.cc | |
| parent | 14086582c87c4297fd14bd3c3831afd3cd1d2833 (diff) | |
| download | python-apt-044322b4dca1135671a93ebfe1601214f7f6e655.tar.gz | |
Remove old API compatibility C++ support code
Diffstat (limited to 'python/cdrom.cc')
| -rw-r--r-- | python/cdrom.cc | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/python/cdrom.cc b/python/cdrom.cc index 46bb769c..392dd834 100644 --- a/python/cdrom.cc +++ b/python/cdrom.cc @@ -78,38 +78,10 @@ static PyObject *cdrom_ident(PyObject *Self,PyObject *Args) } } -#ifdef COMPAT_0_7 -static PyObject *cdrom_ident_old(PyObject *Self,PyObject *Args) -{ - PyErr_WarnEx(PyExc_DeprecationWarning, "Method 'Ident' of the " - "'apt_pkg.Cdrom' object is deprecated, use 'ident' instead.", - 1); - pkgCdrom &Cdrom = GetCpp<pkgCdrom>(Self); - - PyObject *pyCdromProgressInst = 0; - if (PyArg_ParseTuple(Args, "O", &pyCdromProgressInst) == 0) { - return 0; - } - - PyCdromProgress progress; - progress.setCallbackInst(pyCdromProgressInst); - - std::string ident; - bool res = Cdrom.Ident(ident, &progress); - - PyObject *boolres = PyBool_FromLong(res); - PyObject *result = Py_BuildValue("(Os)", boolres, ident.c_str()); - - return HandleErrors(result); -} -#endif static PyMethodDef cdrom_methods[] = { {"add",cdrom_add,METH_VARARGS,cdrom_add_doc}, {"ident",cdrom_ident,METH_VARARGS,cdrom_ident_doc}, -#ifdef COMPAT_0_7 - {"Ident",cdrom_ident_old,METH_VARARGS,"DEPRECATED. DO NOT USE"}, -#endif {} }; @@ -165,11 +137,3 @@ PyTypeObject PyCdrom_Type = { cdrom_new, // tp_new }; -#ifdef COMPAT_0_7 -PyObject *GetCdrom(PyObject *Self,PyObject *Args) -{ - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetCdrom() is deprecated. " - "Please see apt_pkg.Cdrom() for the replacement.", 1); - return cdrom_new(&PyCdrom_Type,Args,0); -} -#endif |
