mirror of
https://github.com/boostorg/python.git
synced 2026-01-20 16:52:15 +00:00
no message
[SVN r12845]
This commit is contained in:
@@ -175,7 +175,7 @@ class_(char const* name)
|
||||
<dl class="function-semantics">
|
||||
<dt><b>Requires:</b> <code>name</code> is a ntbs which conforms to
|
||||
Python's <a href=
|
||||
"http://www.python.org/doc/current/ref/identifiers.html">identifier
|
||||
"http://www.python.org/doc/2.2/ref/identifiers.html">identifier
|
||||
naming rules</a>.
|
||||
|
||||
<dt><b>Effects:</b> Constructs a <code>class_</code> object which
|
||||
@@ -198,7 +198,7 @@ class_& def(char const* name, Fn f, CallPolicy policy)
|
||||
<dt><b>Requires:</b> <code>f</code> is a non-null pointer-to-function or
|
||||
pointer-to-member-function. <code>name</code> is a ntbs which conforms to
|
||||
Python's <a href=
|
||||
"http://www.python.org/doc/current/ref/identifiers.html">identifier
|
||||
"http://www.python.org/doc/2.2/ref/identifiers.html">identifier
|
||||
naming rules</a>. In the first form, the return type of
|
||||
<code>f</code> is not a reference and is not a pointer other
|
||||
than <code>char const*</code> or <code>PyObject*</code>. In the
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
introduction = '''
|
||||
'''
|
||||
|
||||
class boost(namespace): pass
|
||||
|
||||
class python(boost):
|
||||
|
||||
class class_(class_template):
|
||||
T = type()
|
||||
T.requires = 'a class type'
|
||||
|
||||
Bases = concepts.mpl_sequence('class type')
|
||||
HolderGenerator = concepts.HolderGenerator()
|
||||
template_args = (T, Bases, HolderGenerator)
|
||||
|
||||
class def_1(function_template):
|
||||
name = "def"
|
||||
args = (('char const*', 'name'), ('F', 'f'))
|
||||
|
||||
class_template
|
||||
@@ -65,7 +65,7 @@
|
||||
<p><code>error_already_set</code> is an exception type which can be thrown
|
||||
to indicate that a Python error has occurred. If thrown, the precondition
|
||||
is that <a href=
|
||||
"http://www.python.org/doc/current/api/exceptionHandling.html#l2h-71">PyErr_Occurred()</a>
|
||||
"http://www.python.org/doc/2.2/api/exceptionHandling.html#l2h-71">PyErr_Occurred()</a>
|
||||
returns a value convertible to <code>true</code>.
|
||||
|
||||
<h4><a name="class-spec-synopsis"></a>Class error_already_set synopsis</h4>
|
||||
@@ -131,7 +131,7 @@ template <class T> T* expect_non_null(T* x);
|
||||
|
||||
<dt><b>Rationale:</b> Simplifies error-handling when calling many
|
||||
functions in the <a href=
|
||||
"http://www.python.org/doc/current/api/api.html">Python/C API</a>, which
|
||||
"http://www.python.org/doc/2.2/api/api.html">Python/C API</a>, which
|
||||
return 0 on error.
|
||||
</dl>
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<td><code>python_type</code>
|
||||
|
||||
<td>A compile-time constant <code><a
|
||||
href="http://www.python.org/doc/current/ext/dnt-type-methods.html">PyTypeObject</a>*</code>
|
||||
href="http://www.python.org/doc/2.2/ext/dnt-type-methods.html">PyTypeObject</a>*</code>
|
||||
|
||||
<td>The Python type of instances convertible by this
|
||||
converter. Python subtypes are also convertible.
|
||||
@@ -213,7 +213,7 @@ Member& execute(Class& c);
|
||||
<h2><a name="examples"></a>Example</h2>
|
||||
|
||||
This example presumes that someone has implemented the standard <a
|
||||
href="http://www.python.org/doc/current/ext/dnt-basics.html">noddy
|
||||
href="http://www.python.org/doc/2.2/ext/dnt-basics.html">noddy
|
||||
example module</a> from the Python documentation, and we want to build
|
||||
a module which manipulates <code>Noddy</code>s. Since
|
||||
<code>noddy_NoddyObject</code> is so simple that it carries no
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
<p><a name=
|
||||
"BOOST_PYTHON_MODULE_INIT-spec"><code>BOOST_PYTHON_MODULE_INIT(name)</code></a>
|
||||
is used to declare Python <a href=
|
||||
"http://www.python.org/doc/current/ext/methodTable.html#SECTION003400000000000000000">
|
||||
"http://www.python.org/doc/2.2/ext/methodTable.html#SECTION003400000000000000000">
|
||||
module initialization functions</a>. The <code>name</code> argument must
|
||||
exactly match the name of the module to be initialized, and must conform to
|
||||
Python's <a href=
|
||||
"http://www.python.org/doc/current/ref/identifiers.html">identifier naming
|
||||
"http://www.python.org/doc/2.2/ref/identifiers.html">identifier naming
|
||||
rules</a>. Where you would normally write
|
||||
<pre>
|
||||
void init<i>name</i>()
|
||||
@@ -150,7 +150,7 @@ module& setattr(const char* name, ref const& r);
|
||||
<dl class="function-semantics">
|
||||
<dt><b>Requires:</b> <code>name</code> is a ntbs which conforms to
|
||||
Python's <a href=
|
||||
"http://www.python.org/doc/current/ref/identifiers.html">identifier
|
||||
"http://www.python.org/doc/2.2/ref/identifiers.html">identifier
|
||||
naming rules</a>. In the first two forms, <code>obj</code> is non-null.
|
||||
In the third form, <code>r.get()</code> is non-null.
|
||||
|
||||
@@ -176,7 +176,7 @@ module& add(class_<T,Bases,HolderGenerator> const& c);
|
||||
<dt><b>Effects:</b> The first form adds the Python type object named by
|
||||
<code>x</code> to the Python module under construction, with the name
|
||||
given by the type's <code><a href=
|
||||
"http://www.python.org/doc/current/ext/dnt-type-methods.html">tp_name</a></code>
|
||||
"http://www.python.org/doc/2.2/ext/dnt-type-methods.html">tp_name</a></code>
|
||||
field. The second form adds the extension class object being constructed
|
||||
by <code>c</code> to the module, with the same name that was passed to
|
||||
<code>c</code>'s constructor.
|
||||
@@ -199,7 +199,7 @@ module& def(char const* name, Fn f, ResultHandler handler);
|
||||
<dt><b>Requires:</b> <code>f</code> is a non-null pointer-to-function or
|
||||
pointer-to-member-function. <code>name</code> is a ntbs which conforms to
|
||||
Python's <a href=
|
||||
"http://www.python.org/doc/current/ref/identifiers.html">identifier
|
||||
"http://www.python.org/doc/2.2/ref/identifiers.html">identifier
|
||||
naming rules</a>. In the first form, the return type of
|
||||
<code>f</code> is not a reference and is not a pointer other
|
||||
than <code>char const*</code> or <code>PyObject*</code>. In the
|
||||
|
||||
Reference in New Issue
Block a user