|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54862 - in sandbox-branches/bhy/py3k: boost/python libs/python/src
From: divinekid_at_[hidden]
Date: 2009-07-10 12:47:17
Author: bhy
Date: 2009-07-10 12:47:17 EDT (Fri, 10 Jul 2009)
New Revision: 54862
URL: http://svn.boost.org/trac/boost/changeset/54862
Log:
remove decode() method in str wrapper for py3k
Text files modified:
sandbox-branches/bhy/py3k/boost/python/str.hpp | 4 ++++
sandbox-branches/bhy/py3k/libs/python/src/str.cpp | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
Modified: sandbox-branches/bhy/py3k/boost/python/str.hpp
==============================================================================
--- sandbox-branches/bhy/py3k/boost/python/str.hpp (original)
+++ sandbox-branches/bhy/py3k/boost/python/str.hpp 2009-07-10 12:47:17 EDT (Fri, 10 Jul 2009)
@@ -37,10 +37,12 @@
long count(object_cref sub, object_cref start, object_cref end) const;
+#if PY_VERSION_HEX < 0x03000000
object decode() const;
object decode(object_cref encoding) const;
object decode(object_cref encoding, object_cref errors) const;
+#endif
object encode() const;
object encode(object_cref encoding) const;
@@ -185,6 +187,7 @@
return base::count(object(sub), object(start));
}
+#if PY_VERSION_HEX < 0x03000000
object decode() const { return base::decode(); }
template<class T>
@@ -198,6 +201,7 @@
{
return base::decode(object(encoding),object(errors));
}
+#endif
object encode() const { return base::encode(); }
Modified: sandbox-branches/bhy/py3k/libs/python/src/str.cpp
==============================================================================
--- sandbox-branches/bhy/py3k/libs/python/src/str.cpp (original)
+++ sandbox-branches/bhy/py3k/libs/python/src/str.cpp 2009-07-10 12:47:17 EDT (Fri, 10 Jul 2009)
@@ -115,6 +115,7 @@
return extract<long>(this->attr("count")(sub,start,end));
}
+#if PY_VERSION_HEX < 0x03000000
object str_base::decode() const
{
return this->attr("decode")();
@@ -129,6 +130,7 @@
{
return this->attr("decode")(encoding,errors);
}
+#endif
object str_base::encode() const
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk