Skip to content

Commit 76db331

Browse files
author
Ralf W. Grosse-Kunstleve
committed
merging current boost/python and libs/python from trunk into release branch
[SVN r77125]
1 parent 7acb544 commit 76db331

File tree

3 files changed

+27
-30
lines changed

3 files changed

+27
-30
lines changed

doc/v2/make_function.html

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ <h2><a name="functions"></a>Functions</h2>
9696
to <code>f</code>. <ul>
9797
<li> If <code>policies</code> are supplied, it
9898
will be applied to the function as described <a href=
99-
"CallPolicies.html">here</a>.
99+
"CallPolicies.html">here</a>.
100100
<li>If <code>keywords</code> are
101101
supplied, the keywords will be applied in order to the final
102-
arguments of the resulting function.
102+
arguments of the resulting function.
103103
<li>If <code>Signature</code>
104104
is supplied, it should be an instance of an <a
105105
href="../../../mpl/doc/refmanual/front-extensible-sequence.html">MPL front-extensible
@@ -125,36 +125,33 @@ <h2><a name="functions"></a>Functions</h2>
125125
</dl>
126126

127127
<pre>
128-
<a name=
129-
"make_constructor-spec"></a>template &lt;class T, class ArgList, class Generator&gt;
130-
<a href="object.html#object-spec">object</a> make_constructor();
131-
132-
template &lt;class ArgList, class Generator, class Policies&gt;
128+
<a name="make_constructor-spec">template &lt;class F&gt;</a>
129+
<a href="object.html#object-spec">object</a> make_constructor(F f)
130+
131+
template &lt;class F, class Policies&gt;
132+
<a href=
133+
"object.html#object-spec">object</a> make_constructor(F f, Policies const&amp; policies)
134+
135+
template &lt;class F, class Policies, class KeywordsOrSignature&gt;
136+
<a href=
137+
"object.html#object-spec">object</a> make_constructor(F f, Policies const&amp; policies, KeywordsOrSignature const&amp; ks)
138+
139+
template &lt;class F, class Policies, class Keywords, class Signature&gt;
133140
<a href=
134-
"object.html#object-spec">object</a> make_constructor(Policies const&amp; policies)
141+
"object.html#object-spec">object</a> make_constructor(F f, Policies const&amp; policies, Keywords const&amp; kw, Signature const&amp; sig)
135142
</pre>
136143

137144
<dl class="function-semantics">
138-
<dt><b>Requires:</b> <code>T</code> is a class type.
139-
<code>Policies</code> is a model of <a href=
140-
"CallPolicies.html">CallPolicies</a>. <code>ArgList</code> is an <a
141-
href="../../../mpl/doc/refmanual/forward-sequence.html">MPL sequence</a> of C++ argument
142-
types (<i>A1,&nbsp;A2,...&nbsp;AN</i>) such that if
143-
<code>a1,&nbsp;a2</code>...&nbsp;<code>aN</code> are objects of type
144-
<i>A1,&nbsp;A2,...&nbsp;AN</i> respectively, the expression <code>new
145-
Generator::apply&lt;T&gt;::type(a1,&nbsp;a2</code>...&nbsp;<code>aN</code>)
146-
is valid. Generator is a model of <a href=
147-
"HolderGenerator.html">HolderGenerator</a>.</dt>
145+
<dt><b>Requires:</b> <code>F</code> is a
146+
function pointer type. If <code>policies</code> are supplied, it must
147+
be a model of <a href="CallPolicies.html">CallPolicies</a>. If
148+
<code>kewords</code> are supplied, it must be the result of a <a href=
149+
"args.html#keyword-expression"><em>keyword-expression</em></a>
150+
specifying no more arguments than the <a href=
151+
"definitions.html#arity">arity</a> of <code>f</code>.</dt>
148152

149153
<dt><b>Effects:</b> Creates a Python callable object which, when called
150-
from Python, expects its first argument to be a Boost.Python extension
151-
class object. It converts its remaining its arguments to C++ and passes
152-
them to the constructor of a dynamically-allocated
153-
<code>Generator::apply&lt;T&gt;::type</code> object, which is then
154-
installed in the extension class object. In the second form, the
155-
<code>policies</code> are applied to the arguments and result (<a href=
156-
"http://www.python.org/doc/current/lib/bltin-null-object.html">None</a>)
157-
of the Python callable object</dt>
154+
from Python, converts its arguments to C++ and calls <code>f</code>.</dt>
158155

159156
<dt><b>Returns:</b> An instance of <a href=
160157
"object.html#object-spec">object</a> which holds the new Python
@@ -186,7 +183,7 @@ <h2><a name="examples"></a>Example</h2>
186183
def("choose_function", choose_function);
187184
}
188185
</pre>
189-
It can be used this way in Python:
186+
It can be used this way in Python:
190187
<pre>
191188
&gt;&gt;&gt; from make_function_test import *
192189
&gt;&gt;&gt; f = choose_function(1)

include/boost/python/detail/config.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676

7777
# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
7878
# if defined(BOOST_PYTHON_SOURCE)
79-
# define BOOST_PYTHON_DECL __attribute__ ((visibility("default")))
79+
# define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
8080
# define BOOST_PYTHON_BUILD_DLL
8181
# else
8282
# define BOOST_PYTHON_DECL
8383
# endif
8484
# define BOOST_PYTHON_DECL_FORWARD
85-
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((visibility("default")))
85+
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
8686
# elif (defined(_WIN32) || defined(__CYGWIN__))
8787
# if defined(BOOST_PYTHON_SOURCE)
8888
# define BOOST_PYTHON_DECL __declspec(dllexport)

include/boost/python/module_init.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern "C" __declspec(dllexport) _BOOST_PYTHON_MODULE_INIT(name)
7676

7777
# define BOOST_PYTHON_MODULE_INIT(name) \
7878
void BOOST_PP_CAT(init_module_,name)(); \
79-
extern "C" __attribute__ ((visibility("default"))) _BOOST_PYTHON_MODULE_INIT(name)
79+
extern "C" __attribute__ ((__visibility__("default"))) _BOOST_PYTHON_MODULE_INIT(name)
8080

8181
# else
8282

0 commit comments

Comments
 (0)