mirror of
https://github.com/boostorg/python.git
synced 2026-01-27 19:12:16 +00:00
Default to Python 2.4 in Unix builds
Applied contributed patches http://tinyurl.com/ndljr and http://tinyurl.com/18r [SVN r35138]
This commit is contained in:
@@ -214,6 +214,9 @@ namespace boost { namespace python { namespace self_ns {
|
||||
<a href=
|
||||
"#operator_-spec">operator_</a><<i>unspecified</i>> str(self_t);
|
||||
|
||||
<a href=
|
||||
"#operator_-spec">operator_</a><<i>unspecified</i>> repr(self_t);
|
||||
|
||||
}}};
|
||||
</pre>
|
||||
The tables below describe the methods generated when the results of the
|
||||
@@ -765,6 +768,15 @@ namespace boost { namespace python { namespace self_ns {
|
||||
<td><code><a href=
|
||||
"../../../conversion/lexical_cast.htm#lexical_cast">lexical_cast</a><std::string>(x)</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>repr</code></td>
|
||||
|
||||
<td><code>__repr__</code></td>
|
||||
|
||||
<td><code><a href=
|
||||
"../../../conversion/lexical_cast.htm#lexical_cast">lexical_cast</a><std::string>(x)</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3><a name="other-spec"></a>Class Template <code>other</code></h3>
|
||||
|
||||
@@ -34,6 +34,7 @@ struct BOOST_PYTHON_DECL registration
|
||||
{
|
||||
public: // member functions
|
||||
explicit registration(type_info target, bool is_shared_ptr = false);
|
||||
~registration();
|
||||
|
||||
// Convert the appropriately-typed data to Python
|
||||
PyObject* to_python(void const volatile*) const;
|
||||
|
||||
@@ -179,7 +179,7 @@ void* pointer_holder_back_reference<Pointer, Value>::holds(type_info dst_t, bool
|
||||
BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil)
|
||||
))
|
||||
{
|
||||
python::detail::initialize_wrapper(self, &*this->m_p);
|
||||
python::detail::initialize_wrapper(self, get_pointer(this->m_p));
|
||||
}
|
||||
|
||||
# undef N
|
||||
|
||||
@@ -339,6 +339,7 @@ BOOST_PYTHON_UNARY_OPERATOR(long, PyLong_FromLong, long_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(float, double, float_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(complex, std::complex<double>, complex_)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(str, lexical_cast<std::string>, str)
|
||||
BOOST_PYTHON_UNARY_OPERATOR(repr, lexical_cast<std::string>, repr)
|
||||
# undef BOOST_PYTHON_UNARY_OPERATOR
|
||||
|
||||
}} // namespace boost::python
|
||||
@@ -350,6 +351,7 @@ using boost::python::self_ns::long_;
|
||||
using boost::python::self_ns::float_;
|
||||
using boost::python::self_ns::complex_;
|
||||
using boost::python::self_ns::str;
|
||||
using boost::python::self_ns::repr;
|
||||
using boost::python::self_ns::pow;
|
||||
# endif
|
||||
|
||||
|
||||
@@ -57,6 +57,24 @@ BOOST_PYTHON_DECL PyObject* registration::to_python(void const volatile* source)
|
||||
: this->m_to_python(const_cast<void*>(source));
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
template< typename T >
|
||||
void delete_node( T* node )
|
||||
{
|
||||
if( !!node && !!node->next )
|
||||
delete_node( node->next );
|
||||
delete node;
|
||||
}
|
||||
}
|
||||
|
||||
registration::~registration()
|
||||
{
|
||||
delete_node(lvalue_chain);
|
||||
delete_node(rvalue_chain);
|
||||
}
|
||||
|
||||
|
||||
namespace // <unnamed>
|
||||
{
|
||||
typedef registration entry;
|
||||
|
||||
Reference in New Issue
Block a user