mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
str, dict, and tuple!
[SVN r14519]
This commit is contained in:
1
Jamfile
1
Jamfile
@@ -29,7 +29,6 @@ dll bpl
|
||||
src/object/life_support.cpp
|
||||
src/errors.cpp
|
||||
src/module.cpp
|
||||
src/objects2.cpp
|
||||
src/converter/builtin_converters.cpp
|
||||
src/converter/arg_to_python_base.cpp
|
||||
src/object/iterator.cpp
|
||||
|
||||
@@ -40,7 +40,7 @@ class str : public object
|
||||
BOOST_PYTHON_DECL long count(object_cref sub, object_cref start) const;
|
||||
|
||||
template<class T1, class T2>
|
||||
str count(T1 const& sub,T2 const& start) const
|
||||
long count(T1 const& sub,T2 const& start) const
|
||||
{
|
||||
return this->count(object(sub), object(start));
|
||||
}
|
||||
@@ -48,41 +48,41 @@ class str : public object
|
||||
BOOST_PYTHON_DECL long count(object_cref sub, object_cref start, object_cref end) const;
|
||||
|
||||
template<class T1, class T2, class T3>
|
||||
str count(T1 const& sub,T2 const& start, T3 const& end) const
|
||||
long count(T1 const& sub,T2 const& start, T3 const& end) const
|
||||
{
|
||||
return this->count(object(sub), object(start));
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str decode() const;
|
||||
BOOST_PYTHON_DECL str decode(object_cref encoding) const;
|
||||
BOOST_PYTHON_DECL object decode() const;
|
||||
BOOST_PYTHON_DECL object decode(object_cref encoding) const;
|
||||
|
||||
template<class T>
|
||||
str decode(T const& encoding) const
|
||||
object decode(T const& encoding) const
|
||||
{
|
||||
return this->decode(object(encoding));
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str decode(object_cref encoding, object_cref errors) const;
|
||||
BOOST_PYTHON_DECL object decode(object_cref encoding, object_cref errors) const;
|
||||
|
||||
template<class T1, class T2>
|
||||
str decode(T1 const& encoding, T2 const& errors) const
|
||||
object decode(T1 const& encoding, T2 const& errors) const
|
||||
{
|
||||
return this->decode(object(encoding),object(errors));
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str encode() const;
|
||||
BOOST_PYTHON_DECL str encode(object_cref encoding) const;
|
||||
BOOST_PYTHON_DECL object encode() const;
|
||||
BOOST_PYTHON_DECL object encode(object_cref encoding) const;
|
||||
|
||||
template <class T>
|
||||
str encode(T const& encoding) const
|
||||
object encode(T const& encoding) const
|
||||
{
|
||||
return this->encode(object(encoding));
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str encode(object_cref encoding, object_cref errors) const;
|
||||
BOOST_PYTHON_DECL object encode(object_cref encoding, object_cref errors) const;
|
||||
|
||||
template <class T1, class T2>
|
||||
str encode(T1 const& encoding, T2 const& errors) const
|
||||
object encode(T1 const& encoding, T2 const& errors) const
|
||||
{
|
||||
return this->encode(object(encoding),object(errors));
|
||||
}
|
||||
|
||||
24
src/str.cpp
24
src/str.cpp
@@ -59,34 +59,34 @@ BOOST_PYTHON_DECL long str::count(object_cref sub, object_cref start, object_cre
|
||||
return extract<long>(this->attr("count")(sub,start,end));
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::decode() const
|
||||
BOOST_PYTHON_DECL object str::decode() const
|
||||
{
|
||||
return assume_str(this->attr("decode")());
|
||||
return this->attr("decode")();
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::decode(object_cref encoding) const
|
||||
BOOST_PYTHON_DECL object str::decode(object_cref encoding) const
|
||||
{
|
||||
return assume_str(this->attr("decode")(encoding));
|
||||
return this->attr("decode")(encoding);
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::decode(object_cref encoding, object_cref errors) const
|
||||
BOOST_PYTHON_DECL object str::decode(object_cref encoding, object_cref errors) const
|
||||
{
|
||||
return assume_str(this->attr("decode")(encoding,errors));
|
||||
return this->attr("decode")(encoding,errors);
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::encode() const
|
||||
BOOST_PYTHON_DECL object str::encode() const
|
||||
{
|
||||
return assume_str(this->attr("encode")());
|
||||
return this->attr("encode")();
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::encode(object_cref encoding) const
|
||||
BOOST_PYTHON_DECL object str::encode(object_cref encoding) const
|
||||
{
|
||||
return assume_str(this->attr("encode")(encoding));
|
||||
return this->attr("encode")(encoding);
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL str str::encode(object_cref encoding, object_cref errors) const
|
||||
BOOST_PYTHON_DECL object str::encode(object_cref encoding, object_cref errors) const
|
||||
{
|
||||
return assume_str(this->attr("encode")(encoding,errors));
|
||||
return this->attr("encode")(encoding,errors);
|
||||
}
|
||||
|
||||
BOOST_PYTHON_DECL bool str::endswith(object_cref suffix) const
|
||||
|
||||
Reference in New Issue
Block a user