diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-08-31 19:59:05 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-08-31 20:02:04 +0400 |
commit | 798846ab8337471998b0a4d796d6d409453faa7d (patch) | |
tree | 7ef72ffb21b6b5feb711549cb8176ab4380b6b90 /python | |
parent | a17aaae3832f627965d2308b63ed90aca4f8872f (diff) | |
download | python-apt-798846ab8337471998b0a4d796d6d409453faa7d.tar.gz |
Use HAVE_OPEN_MEMSTREAM
Diffstat (limited to 'python')
-rw-r--r-- | python/apt_pkgmodule.cc | 4 | ||||
-rw-r--r-- | python/apt_pkgmodule.h | 2 | ||||
-rw-r--r-- | python/tag.cc | 2 |
3 files changed, 8 insertions, 0 deletions
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[] = |