mirror of
https://github.com/boostorg/python.git
synced 2026-01-30 20:12:37 +00:00
remove decode() method in str wrapper for py3k
[SVN r54862]
This commit is contained in:
@@ -37,10 +37,12 @@ namespace detail
|
||||
|
||||
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 @@ class str : public detail::str_base
|
||||
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 @@ class str : public detail::str_base
|
||||
{
|
||||
return base::decode(object(encoding),object(errors));
|
||||
}
|
||||
#endif
|
||||
|
||||
object encode() const { return base::encode(); }
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ long str_base::count(object_cref sub, object_cref start, object_cref end) const
|
||||
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 @@ object str_base::decode(object_cref encoding, object_cref errors) const
|
||||
{
|
||||
return this->attr("decode")(encoding,errors);
|
||||
}
|
||||
#endif
|
||||
|
||||
object str_base::encode() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user