2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 16:32:16 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Beman Dawes
bf05bdc0c3 Release 1.48.0 beta 1
[SVN r75132]
2011-10-27 15:04:52 +00:00
Ralf W. Grosse-Kunstleve
49e8699b9f merging current boost/python and libs/python from trunk into release branch
[SVN r74931]
2011-10-12 21:38:53 +00:00
107 changed files with 44 additions and 33 deletions

Binary file not shown.

0
doc/PyConDC_2003/bpl.html Executable file → Normal file
View File

0
doc/PyConDC_2003/bpl.pdf Executable file → Normal file
View File

0
doc/PyConDC_2003/python_cpp_mix.jpg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
doc/PyConDC_2003/python_cpp_mix.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

0
doc/internals.html Executable file → Normal file
View File

0
doc/internals.rst Executable file → Normal file
View File

0
doc/tutorial/doc/html/images/alert.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

0
doc/tutorial/doc/html/images/home.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 358 B

After

Width:  |  Height:  |  Size: 358 B

0
doc/tutorial/doc/html/images/next.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

0
doc/tutorial/doc/html/images/note.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 658 B

0
doc/tutorial/doc/html/images/prev.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

0
doc/tutorial/doc/html/images/tip.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 640 B

0
doc/tutorial/doc/html/images/up.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

0
doc/v2/instance_holder.html Executable file → Normal file
View File

0
doc/v2/lvalue_from_pytype.html Executable file → Normal file
View File

0
doc/v2/operators.html Executable file → Normal file
View File

0
doc/v2/raw_function.html Executable file → Normal file
View File

0
doc/v2/return_arg.html Executable file → Normal file
View File

View File

@@ -85,7 +85,7 @@ namespace boost { namespace python
object stop();
object step();
// The return type of slice::get_indicies()
// The return type of slice::get_indices()
template <typename RandomAccessIterator>
struct range
{
@@ -96,7 +96,7 @@ namespace boost { namespace python
template <typename RandomAccessIterator>
range<RandomAccessIterator>
get_indicies(
get_indices(
RandomAccessIterator const& begin,
RandomAccessIterator const& end);
};
@@ -164,7 +164,7 @@ slice object, but in practice they are usually integers.</dt>
<pre>
template &lt;typename RandomAccessIterator&gt;
slice::range&lt;RandomAccessIterator&gt;
slice::get_indicies(
slice::get_indices(
RandomAccessIterator const&amp; begin,
RandomAccessIterator const&amp; end) const;
</pre>
@@ -173,8 +173,8 @@ slice::get_indicies(
Iterators that form a half-open range.</dt>
<dt><b>Effects:</b> Create a RandomAccessIterator pair that defines a
fully-closed range within the [begin,end) range of its arguments.&nbsp;
This function translates this slice's indicies while accounting for the
effects of any PyNone or negative indicies, and non-singular step sizes.</dt>
This function translates this slice's indices while accounting for the
effects of any PyNone or negative indices, and non-singular step sizes.</dt>
<dt><b>Returns:</b> a slice::range
that has been initialized with a non-zero value of step and a pair of
RandomAccessIterators that point within the range of this functions
@@ -182,7 +182,7 @@ arguments and define a closed interval.</dt>
<dt><b>Throws:</b> <a href="definitions.html#raise">Raises</a> a Python <code>TypeError</code> exception if any of this slice's arguments
are neither references to <code>PyNone</code> nor convertible to <code>int</code>.&nbsp; Throws
<code>std::invalid_argument</code> if the resulting range would be empty.&nbsp; You
should always wrap calls to <code>slice::get_indicies()</code>
should always wrap calls to <code>slice::get_indices()</code>
within <code>try { ...; } catch (std::invalid_argument) {}</code> to
handle this case and take appropriate action.</dt>
<dt><b>Rationale</b>: closed-interval: If
@@ -221,7 +221,7 @@ double partial_sum(std::vector&lt;double&gt; const&amp; Foo, const slice index)
{
slice::range&lt;std::vector&lt;double&gt;::const_iterator&gt; bounds;
try {
bounds = index.get_indicies&lt;&gt;(Foo.begin(), Foo.end());
bounds = index.get_indices&lt;&gt;(Foo.begin(), Foo.end());
}
catch (std::invalid_argument) {
return 0.0;

0
doc/v2/stl_iterator.html Executable file → Normal file
View File

0
doc/v2/type_id.html Executable file → Normal file
View File

View File

@@ -91,7 +91,7 @@
<hr>
<h2>
<a name="introduction">Introduction</a>
</h2>This header provides faciliites for establishing a lifetime
</h2>This header provides facilities for establishing a lifetime
dependency between two of a function's Python argument or result objects.
The <i>ward</i> object will not be destroyed until after the custodian as
long as the <i>custodian</i> object supports <a href=

0
doc/v2/wrapper.html Executable file → Normal file
View File

0
example/Jamroot Executable file → Normal file
View File

0
example/boost-build.jam Executable file → Normal file
View File

0
example/quickstart/Jamroot Executable file → Normal file
View File

0
include/boost/python/arg_from_python.hpp Executable file → Normal file
View File

0
include/boost/python/base_type_traits.hpp Executable file → Normal file
View File

0
include/boost/python/borrowed.hpp Executable file → Normal file
View File

0
include/boost/python/cast.hpp Executable file → Normal file
View File

View File

@@ -138,7 +138,8 @@ namespace detail
static void
must_be_derived_class_member(Default const&)
{
typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
// https://svn.boost.org/trac/boost/ticket/5803
//typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
typedef typename assertion<is_polymorphic<T> >::failed test1;
# endif

0
include/boost/python/converter/arg_from_python.hpp Executable file → Normal file
View File

0
include/boost/python/converter/arg_to_python.hpp Executable file → Normal file
View File

0
include/boost/python/converter/arg_to_python_base.hpp Executable file → Normal file
View File

View File

0
include/boost/python/converter/object_manager.hpp Executable file → Normal file
View File

0
include/boost/python/converter/pytype_function.hpp Executable file → Normal file
View File

0
include/boost/python/converter/return_from_python.hpp Executable file → Normal file
View File

0
include/boost/python/def_visitor.hpp Executable file → Normal file
View File

0
include/boost/python/detail/borrowed_ptr.hpp Executable file → Normal file
View File

0
include/boost/python/detail/convertible.hpp Executable file → Normal file
View File

0
include/boost/python/detail/copy_ctor_mutates_rhs.hpp Executable file → Normal file
View File

0
include/boost/python/detail/def_helper_fwd.hpp Executable file → Normal file
View File

0
include/boost/python/detail/enable_if.hpp Executable file → Normal file
View File

0
include/boost/python/detail/force_instantiate.hpp Executable file → Normal file
View File

0
include/boost/python/detail/is_shared_ptr.hpp Executable file → Normal file
View File

0
include/boost/python/detail/is_wrapper.hpp Executable file → Normal file
View File

View File

@@ -57,7 +57,7 @@ object make_keyword_range_constructor(
, Holder* = 0
, ArgList* = 0, Arity* = 0)
{
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE)
python_class<BOOST_DEDUCED_TYPENAME Holder::value_type>::register_();
#endif
return detail::make_keyword_range_function(

View File

0
include/boost/python/detail/prefix.hpp Executable file → Normal file
View File

0
include/boost/python/detail/python_type.hpp Executable file → Normal file
View File

0
include/boost/python/detail/sfinae.hpp Executable file → Normal file
View File

0
include/boost/python/detail/unwind_type.hpp Executable file → Normal file
View File

0
include/boost/python/detail/unwrap_type_id.hpp Executable file → Normal file
View File

0
include/boost/python/detail/unwrap_wrapper.hpp Executable file → Normal file
View File

0
include/boost/python/detail/value_arg.hpp Executable file → Normal file
View File

0
include/boost/python/detail/wrapper_base.hpp Executable file → Normal file
View File

0
include/boost/python/docstring_options.hpp Executable file → Normal file
View File

0
include/boost/python/handle.hpp Executable file → Normal file
View File

0
include/boost/python/handle_fwd.hpp Executable file → Normal file
View File

0
include/boost/python/instance_holder.hpp Executable file → Normal file
View File

0
include/boost/python/object.hpp Executable file → Normal file
View File

View File

@@ -238,7 +238,7 @@ struct class_metadata
//
inline static void maybe_register_pointer_to_python(...) {}
#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*)
{
objects::copy_class_object(python::type_id<T>(), python::type_id<back_reference<T const &> >());
@@ -255,7 +255,7 @@ struct class_metadata
, make_ptr_instance<T2, pointer_holder<held_type, T2> >
>()
);
#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
// explicit qualification of type_id makes msvc6 happy
objects::copy_class_object(python::type_id<T2>(), python::type_id<held_type>());
#endif
@@ -270,7 +270,7 @@ struct class_metadata
inline static void maybe_register_class_to_python(T2*, mpl::false_)
{
python::detail::force_instantiate(class_cref_wrapper<T2, make_instance<T2, holder> >());
#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
// explicit qualification of type_id makes msvc6 happy
objects::copy_class_object(python::type_id<T2>(), python::type_id<held_type>());
#endif

0
include/boost/python/object/function_doc_signature.hpp Executable file → Normal file
View File

0
include/boost/python/object/inheritance_query.hpp Executable file → Normal file
View File

View File

@@ -12,7 +12,7 @@
# include <boost/python/object/instance.hpp>
# include <boost/python/converter/registry.hpp>
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE)
# include <boost/python/detail/python_type.hpp>
#endif
@@ -81,7 +81,7 @@ struct make_holder<N>
# endif
static void execute(
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE)
boost::python::detail::python_class<BOOST_DEDUCED_TYPENAME Holder::value_type> *p
#else
PyObject *p

0
include/boost/python/object/stl_iterator_core.hpp Executable file → Normal file
View File

0
include/boost/python/object_items.hpp Executable file → Normal file
View File

0
include/boost/python/object_protocol_core.hpp Executable file → Normal file
View File

0
include/boost/python/other.hpp Executable file → Normal file
View File

0
include/boost/python/proxy.hpp Executable file → Normal file
View File

0
include/boost/python/pure_virtual.hpp Executable file → Normal file
View File

0
include/boost/python/raw_function.hpp Executable file → Normal file
View File

0
include/boost/python/refcount.hpp Executable file → Normal file
View File

0
include/boost/python/return_arg.hpp Executable file → Normal file
View File

0
include/boost/python/self.hpp Executable file → Normal file
View File

View File

@@ -30,7 +30,7 @@ namespace detail
// that created this slice, than that parameter is None here, and compares
// equal to a default-constructed boost::python::object.
// If a user-defined type wishes to support slicing, then support for the
// special meaning associated with negative indicies is up to the user.
// special meaning associated with negative indices is up to the user.
object start() const;
object stop() const;
object step() const;
@@ -63,7 +63,7 @@ class slice : public detail::slice_base
// The following algorithm is intended to automate the process of
// determining a slice range when you want to fully support negative
// indicies and non-singular step sizes. Its functionallity is simmilar to
// indices and non-singular step sizes. Its functionallity is simmilar to
// PySlice_GetIndicesEx() in the Python/C API, but tailored for C++ users.
// This template returns a slice::range struct that, when used in the
// following iterative loop, will traverse a slice of the function's
@@ -110,7 +110,7 @@ class slice : public detail::slice_base
template<typename RandomAccessIterator>
slice::range<RandomAccessIterator>
get_indicies( const RandomAccessIterator& begin,
get_indices( const RandomAccessIterator& begin,
const RandomAccessIterator& end) const
{
// This is based loosely on PySlice_GetIndicesEx(), but it has been
@@ -240,6 +240,16 @@ class slice : public detail::slice_base
return ret;
}
// Incorrect spelling. DO NOT USE. Only here for backward compatibility.
// Corrected 2011-06-14.
template<typename RandomAccessIterator>
slice::range<RandomAccessIterator>
get_indicies( const RandomAccessIterator& begin,
const RandomAccessIterator& end) const
{
get_indices(begin, end);
}
public:
// This declaration, in conjunction with the specialization of

0
include/boost/python/stl_iterator.hpp Executable file → Normal file
View File

0
include/boost/python/wrapper.hpp Executable file → Normal file
View File

View File

@@ -433,23 +433,23 @@ void function::add_to_namespace(
if (attribute.ptr()->ob_type == &function_type)
{
function* new_func = downcast<function>(attribute.ptr());
PyObject* dict = 0;
handle<> dict;
#if PY_VERSION_HEX < 0x03000000
// Old-style class gone in Python 3
if (PyClass_Check(ns))
dict = ((PyClassObject*)ns)->cl_dict;
dict = handle<>(borrowed(((PyClassObject*)ns)->cl_dict));
else
#endif
if (PyType_Check(ns))
dict = ((PyTypeObject*)ns)->tp_dict;
dict = handle<>(borrowed(((PyTypeObject*)ns)->tp_dict));
else
dict = PyObject_GetAttrString(ns, const_cast<char*>("__dict__"));
dict = handle<>(PyObject_GetAttrString(ns, const_cast<char*>("__dict__")));
if (dict == 0)
throw_error_already_set();
handle<> existing(allow_null(::PyObject_GetItem(dict, name.ptr())));
handle<> existing(allow_null(::PyObject_GetItem(dict.get(), name.ptr())));
if (existing)
{

0
src/wrapper.cpp Executable file → Normal file
View File

0
test/borrowed.cpp Executable file → Normal file
View File

0
test/cltree.cpp Executable file → Normal file
View File

0
test/copy_ctor_mutates_rhs.cpp Executable file → Normal file
View File

0
test/crossmod_exception_a.cpp Executable file → Normal file
View File

0
test/crossmod_exception_b.cpp Executable file → Normal file
View File

0
test/injected.cpp Executable file → Normal file
View File

0
test/int_map_indexing_suite.cpp Executable file → Normal file
View File

0
test/keywords.cpp Executable file → Normal file
View File

0
test/object_fail1.cpp Executable file → Normal file
View File

0
test/object_manager.cpp Executable file → Normal file
View File

0
test/operators.cpp Executable file → Normal file
View File

0
test/polymorphism2.cpp Executable file → Normal file
View File

0
test/polymorphism2_auto_ptr.cpp Executable file → Normal file
View File

0
test/properties.cpp Executable file → Normal file
View File

0
test/raw_ctor.cpp Executable file → Normal file
View File

0
test/raw_pyobject_fail1.cpp Executable file → Normal file
View File

0
test/raw_pyobject_fail2.cpp Executable file → Normal file
View File

0
test/result.cpp Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More