Skip to content

Commit ca64c96

Browse files
committed
Added dangling_reference FAQ
Various idiomatic MPL cleanups in indirect_traits.hpp raw_function support Patches for CWPro7.2 Patches to pass tests under Python 2.3 with the new bool type. Tests for member operators returning const objects Fixes for testing Boost.Python under Cygwin [SVN r17777]
1 parent ff734e3 commit ca64c96

20 files changed

+777
-459
lines changed

doc/v2/def.html

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<head>
55
<meta name="generator" content=
6-
"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org">
6+
"HTML Tidy for Cygwin (vers 1st April 2002), see www.w3.org">
77
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
88
<link rel="stylesheet" type="text/css" href="../boost.css">
99

@@ -75,6 +75,12 @@ <h2><a name="functions"></a>Functions</h2>
7575

7676
<dd>
7777
<ul>
78+
<li>If <code>Fn</code> is [derived from] <code><a href=
79+
"object.html#object-spec">object</a></code>, it will be added to
80+
the current scope as a single overload. To be useful,
81+
<code>fn</code> should be <a href=
82+
"http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-6">callable</a>.</li>
83+
7884
<li>
7985
If <code>a1</code> is the result of an <a href=
8086
"overloads.html#overload-dispatch-expression"><em>overload-dispatch-expression</em></a>,
@@ -104,67 +110,52 @@ <h2><a name="functions"></a>Functions</h2>
104110
</dl>
105111
</li>
106112

107-
<li>
108-
Otherwise, a single function overload built around fn (which must
109-
not be null) is added to the <a href="scope.html">current
110-
scope</a>:
111-
112-
<ul>
113-
<li>If fn is a function or member function pointer,
114-
<code>a1</code>-<code>a3</code> (if supplied) may be selected
115-
in any order from the table below.</li>
116-
117-
<li>Otherwise, <code>Fn</code> must be [derived from] <code><a
118-
href="object.html#object-spec">object</a></code>, and
119-
<code>a1-a2</code> (if supplied) may be selcted in any order
120-
from the first two rows of the table below. To be useful,
121-
<code>fn</code> should be <a href=
122-
"http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-6">
123-
callable</a>.</li>
124-
</ul>
113+
<li>Otherwise, fn must be a non-null function or member function
114+
pointer, and a single function overload built around fn is added to
115+
the <a href="scope.html">current scope</a>. If any of
116+
<code>a1</code>-<code>a3</code> are supplied, they may be selected
117+
in any order from the table below.</li>
118+
</ul>
125119

126-
<table border="1" summary="def() optional arguments">
127-
<tr>
128-
<th>Memnonic Name</th>
120+
<table border="1" summary="def() optional arguments">
121+
<tr>
122+
<th>Memnonic Name</th>
129123

130-
<th>Requirements/Type properties</th>
124+
<th>Requirements/Type properties</th>
131125

132-
<th>Effects</th>
133-
</tr>
126+
<th>Effects</th>
127+
</tr>
134128

135-
<tr>
136-
<td>docstring</td>
129+
<tr>
130+
<td>docstring</td>
137131

138-
<td>Any <a href="definitions.html#ntbs">ntbs</a>.</td>
132+
<td>Any <a href="definitions.html#ntbs">ntbs</a>.</td>
139133

140-
<td>Value will be bound to the <code>__doc__</code> attribute
141-
of the resulting method overload.</td>
142-
</tr>
134+
<td>Value will be bound to the <code>__doc__</code> attribute of
135+
the resulting method overload.</td>
136+
</tr>
143137

144-
<tr>
145-
<td>policies</td>
138+
<tr>
139+
<td>policies</td>
146140

147-
<td>A model of <a href=
148-
"CallPolicies.html">CallPolicies</a></td>
141+
<td>A model of <a href="CallPolicies.html">CallPolicies</a></td>
149142

150-
<td>A copy will be used as the call policies of the resulting
151-
method overload.</td>
152-
</tr>
143+
<td>A copy will be used as the call policies of the resulting
144+
method overload.</td>
145+
</tr>
153146

154-
<tr>
155-
<td>keywords</td>
147+
<tr>
148+
<td>keywords</td>
156149

157-
<td>The result of a <a href=
158-
"args.html#keyword-expression"><em>keyword-expression</em></a>
159-
specifying no more arguments than the <a href=
160-
"definitions.html#arity">arity</a> of <code>fn</code>.</td>
150+
<td>The result of a <a href=
151+
"args.html#keyword-expression"><em>keyword-expression</em></a>
152+
specifying no more arguments than the <a href=
153+
"definitions.html#arity">arity</a> of <code>fn</code>.</td>
161154

162-
<td>A copy will be used as the call policies of the resulting
163-
method overload.</td>
164-
</tr>
165-
</table>
166-
</li>
167-
</ul>
155+
<td>A copy will be used as the call policies of the resulting
156+
method overload.</td>
157+
</tr>
158+
</table>
168159
</dd>
169160
</dl>
170161

@@ -174,6 +165,8 @@ <h2><a name="examples"></a>Example</h2>
174165
#include &lt;boost/python/module.hpp&gt;
175166
#include &lt;boost/python/args.hpp&gt;
176167

168+
using namespace boost::python;
169+
177170
char const* foo(int x, int y) { return "foo"; }
178171

179172
BOOST_PYTHON_MODULE(def_test)
@@ -184,8 +177,8 @@ <h2><a name="examples"></a>Example</h2>
184177

185178
<p>
186179
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
187-
13 November, 2002
188-
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
180+
7 March, 2003
181+
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
189182
</p>
190183

191184
<p><i>&copy; Copyright <a href=

0 commit comments

Comments
 (0)