summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-08-31 19:59:05 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-08-31 20:02:04 +0400
commit798846ab8337471998b0a4d796d6d409453faa7d (patch)
tree7ef72ffb21b6b5feb711549cb8176ab4380b6b90
parenta17aaae3832f627965d2308b63ed90aca4f8872f (diff)
downloadpython-apt-798846ab8337471998b0a4d796d6d409453faa7d.tar.gz
Use HAVE_OPEN_MEMSTREAM
-rw-r--r--debian/changelog9
-rw-r--r--python/apt_pkgmodule.cc4
-rw-r--r--python/apt_pkgmodule.h2
-rw-r--r--python/tag.cc2
4 files changed, 15 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index eb4a1b36..5ac830b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,13 @@
-python-apt (0.8.9.2) UNRELEASED; urgency=low
+python-apt (0.8.9.2+dyson1) unstable; urgency=low
+ [ Michael Vogt ]
* some fixes from a coverity scan run
- -- Michael Vogt <mvo@debian.org> Mon, 05 Aug 2013 22:55:02 +0200
+ [ Igor Pashev ]
+ * Package for Dyson
+ * Wrap missing open_memstream with #ifdef HAVE_OPEN_MEMSTREAM
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sat, 31 Aug 2013 20:01:00 +0400
python-apt (0.8.9.1) unstable; urgency=low
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 7704aa01..1a991a48 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -537,8 +537,10 @@ static PyMethodDef methods[] =
"Translate the given string. This is much faster than Python's version\n"
"and only does translations after setlocale() has been called."},
+#ifdef HAVE_OPEN_MEMSTREAM
// Tag File
{"rewrite_section",RewriteSection,METH_VARARGS,doc_RewriteSection},
+#endif
// Locking
{"get_lock",GetLock,METH_VARARGS,doc_GetLock},
@@ -623,7 +625,9 @@ static PyMethodDef methods[] =
{"ParseSection",ParseSection,METH_VARARGS,doc_ParseSection},
{"ParseTagFile",ParseTagFile,METH_VARARGS,doc_ParseTagFile},
+#ifdef HAVE_OPEN_MEMSTREAM
{"RewriteSection",RewriteSection,METH_VARARGS,doc_RewriteSection},
+#endif
{"GetLock",GetLock,METH_VARARGS,doc_GetLock},
{"PkgSystemLock",PkgSystemLock,METH_VARARGS,doc_PkgSystemLock},
diff --git a/python/apt_pkgmodule.h b/python/apt_pkgmodule.h
index 85c34130..1eb0e2f1 100644
--- a/python/apt_pkgmodule.h
+++ b/python/apt_pkgmodule.h
@@ -45,7 +45,9 @@ extern PyTypeObject PyTagSection_Type;
extern PyTypeObject PyTagFile_Type;
extern char *doc_ParseSection;
extern char *doc_ParseTagFile;
+#ifdef HAVE_OPEN_MEMSTREAM
extern char *doc_RewriteSection;
+#endif
PyObject *ParseSection(PyObject *self,PyObject *Args);
PyObject *ParseTagFile(PyObject *self,PyObject *Args);
PyObject *RewriteSection(PyObject *self,PyObject *Args);
diff --git a/python/tag.cc b/python/tag.cc
index 6ae439f5..46fb8f34 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -517,6 +517,7 @@ PyObject *ParseTagFile(PyObject *self,PyObject *Args) {
}
#endif
/*}}}*/
+#ifdef HAVE_OPEN_MEMSTREAM
// RewriteSection - Rewrite a section.. /*{{{*/
// ---------------------------------------------------------------------
/* An interesting future extension would be to add a user settable
@@ -586,6 +587,7 @@ PyObject *RewriteSection(PyObject *self,PyObject *Args)
return HandleErrors(ResObj);
}
/*}}}*/
+#endif // HAVE_OPEN_MEMSTREAM
// Method table for the Tag Section object
static PyMethodDef TagSecMethods[] =