Skip to content

Commit e11b457

Browse files
committed
Major rearchitecture of from_python mechanism
[SVN r12924]
1 parent a04cbd1 commit e11b457

36 files changed

+892
-1181
lines changed

Jamfile

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ subproject libs/python ;
44
SEARCH on <module@>python.jam = $(BOOST_BUILD_PATH) ;
55
include <module@>python.jam ;
66

7-
PYTHON_PROPERTIES
8-
+= <metrowerks><*><cxxflags>"-inline deferred"
9-
<cxx><*><include>$(BOOST_ROOT)/boost/compatibility/cpp_c_headers
10-
<define>BOOST_PYTHON_DYNAMIC_LIB
11-
<define>BOOST_PYTHON_V2
12-
;
137

148
{
9+
local BOOST_PYTHON_V2_PROPERTIES
10+
= $(PYTHON_PROPERTIES)
11+
<metrowerks><*><cxxflags>"-inline deferred"
12+
<cxx><*><include>$(BOOST_ROOT)/boost/compatibility/cpp_c_headers
13+
<define>BOOST_PYTHON_DYNAMIC_LIB
14+
<define>BOOST_PYTHON_V2
15+
;
16+
17+
local PYTHON_PROPERTIES = $(BOOST_PYTHON_V2_PROPERTIES) ;
18+
1519
dll bpl
1620
:
1721
src/converter/from_python.cpp
@@ -26,7 +30,7 @@ PYTHON_PROPERTIES
2630
src/objects.cpp
2731
src/converter/builtin_converters.cpp
2832
:
29-
$(PYTHON_PROPERTIES)
33+
$(BOOST_PYTHON_V2_PROPERTIES)
3034
<define>BOOST_PYTHON_SOURCE
3135
;
3236

@@ -67,4 +71,20 @@ PYTHON_PROPERTIES
6771
:
6872
: debug-python
6973
;
74+
7075
}
76+
77+
unit-test indirect_traits_test
78+
: test/indirect_traits_test.cpp : <include>$(BOOST_ROOT) ;
79+
unit-test destroy_test
80+
: test/destroy_test.cpp : <include>$(BOOST_ROOT) ;
81+
unit-test pointer_type_id_test
82+
: test/pointer_type_id_test.cpp : <include>$(BOOST_ROOT) ;
83+
84+
unit-test select_from_python_test
85+
: test/select_from_python_test.cpp
86+
src/converter/type_id.cpp
87+
src/converter/registry.cpp # MWerks needs this for some reason
88+
: $(PYTHON_PROPERTIES)
89+
;
90+

doc/v2/module.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h4><a name="module-spec-modifiers">Class <code>module</code></a> modifier
157157
<dt><b>Effects:</b> Adds the given Python object to the module. If the
158158
object is a product of <code><a href=
159159
"make_function.html#make_function-spec">make_function</a>()</code>, the
160-
usual <a href="http:overloading.html">overloading procedure</a> applies.
160+
usual <a href="overloading.html">overloading procedure</a> applies.
161161
In the first two forms, ownership of a reference to obj is transferred
162162
from caller to callee, even if an exception is thrown.
163163

include/boost/python/converter/body.hpp

Lines changed: 0 additions & 62 deletions
This file was deleted.

include/boost/python/converter/class.hpp

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright David Abrahams 2002. Permission to copy, use,
2+
// modify, sell and distribute this software is granted provided this
3+
// copyright notice appears in all copies. This software is provided
4+
// "as is" without express or implied warranty, and with no claim as
5+
// to its suitability for any purpose.
6+
#ifndef FIND_FROM_PYTHON_DWA2002223_HPP
7+
# define FIND_FROM_PYTHON_DWA2002223_HPP
8+
9+
# include <boost/python/detail/config.hpp>
10+
# include <boost/python/detail/wrap_python.hpp>
11+
12+
namespace boost { namespace python { namespace converter {
13+
14+
struct lvalue_from_python_registration;
15+
struct rvalue_from_python_registration;
16+
struct rvalue_stage1_data;
17+
18+
BOOST_PYTHON_DECL void* find(
19+
PyObject* source, lvalue_from_python_registration const*);
20+
BOOST_PYTHON_DECL void* find(
21+
PyObject* source, rvalue_from_python_registration const*, rvalue_stage1_data&);
22+
23+
}}} // namespace boost::python::converter
24+
25+
#endif // FIND_FROM_PYTHON_DWA2002223_HPP

0 commit comments

Comments
 (0)