summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/apt_instmodule.cc19
-rw-r--r--python/apt_instmodule.h3
-rw-r--r--python/tar.cc4
3 files changed, 14 insertions, 12 deletions
diff --git a/python/apt_instmodule.cc b/python/apt_instmodule.cc
index 9cb166ed..2721509e 100644
--- a/python/apt_instmodule.cc
+++ b/python/apt_instmodule.cc
@@ -23,6 +23,8 @@
#include <Python.h>
/*}}}*/
+#ifdef COMPAT_0_7
+
// debExtractControl - Exctract an arbitary control member /*{{{*/
// ---------------------------------------------------------------------
/* This is a common operation so this function will stay, but others that
@@ -149,25 +151,20 @@ static PyObject *arCheckMember(PyObject *Self,PyObject *Args)
static PyMethodDef methods[] =
{
// access to ar files
- {"ar_check_member", arCheckMember, METH_VARARGS, doc_arCheckMember},
+ {"arCheckMember", arCheckMember, METH_VARARGS, doc_arCheckMember},
// access to deb files
- {"deb_extract_control",debExtractControl,METH_VARARGS,doc_debExtractControl},
- {"deb_extract_archive",debExtractArchive,METH_VARARGS,doc_debExtractArchive},
-
- // access to tar streams
- {"tar_extract",tarExtract,METH_VARARGS,doc_tarExtract},
- {"deb_extract",debExtract,METH_VARARGS,doc_debExtract},
-
-#ifdef COMPAT_0_7
- {"arCheckMember", arCheckMember, METH_VARARGS, doc_arCheckMember},
{"debExtractControl",debExtractControl,METH_VARARGS,doc_debExtractControl},
{"debExtractArchive",debExtractArchive,METH_VARARGS,doc_debExtractArchive},
+
+ // access to tar streams
{"tarExtract",tarExtract,METH_VARARGS,doc_tarExtract},
{"debExtract",debExtract,METH_VARARGS,doc_debExtract},
-#endif
{}
};
+#else
+static PyMethodDef *methods = 0;
+#endif // defined(COMPAT_0_7)
static const char *apt_inst_doc =
diff --git a/python/apt_instmodule.h b/python/apt_instmodule.h
index 9f978e44..2b07261b 100644
--- a/python/apt_instmodule.h
+++ b/python/apt_instmodule.h
@@ -14,11 +14,12 @@
#include "generic.h"
#include <apt-pkg/extracttar.h>
+#ifdef COMPAT_0_7
PyObject *debExtract(PyObject *Self,PyObject *Args);
extern char *doc_debExtract;
PyObject *tarExtract(PyObject *Self,PyObject *Args);
extern char *doc_tarExtract;
-
+#endif
extern PyTypeObject PyArMember_Type;
extern PyTypeObject PyArArchive_Type;
diff --git a/python/tar.cc b/python/tar.cc
index b93ba31a..b994d4e7 100644
--- a/python/tar.cc
+++ b/python/tar.cc
@@ -4,10 +4,13 @@
/* ######################################################################
Tar Inteface
+ * THIS FILE IS COMPLETELY DEPRECATED, AND NOT USED ANYMORE IF BUILT *
+ * WITHOUT COMPATIBILITY. *
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#ifdef COMPAT_0_7
#include "generic.h"
#include <apt-pkg/extracttar.h>
@@ -189,3 +192,4 @@ PyObject *debExtract(PyObject *Self,PyObject *Args)
return HandleErrors(Py_None);
}
/*}}}*/
+#endif // defined(COMPAT_0_7)