123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
- <title>Chapter 3. Configuration</title>
- <link rel="stylesheet" href="boostbook.css" type="text/css">
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
- <link rel="home" href="index.html" title="Boost.Python">
- <link rel="up" href="index.html" title="Boost.Python">
- <link rel="prev" href="building/notes_for_mingw_and_cygwin_with_.html" title="Notes for MinGW (and Cygwin with -mno-cygwin) GCC Users">
- <link rel="next" href="support.html" title="Chapter 4. Support Resources">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="" width="" height="" src="images/boost.png"></td></tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="building/notes_for_mingw_and_cygwin_with_.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="support.html"><img src="images/next.png" alt="Next"></a>
- </div>
- <div class="chapter">
- <div class="titlepage"><div>
- <div><h1 class="title">
- <a name="configuration"></a>Chapter 3. Configuration</h1></div>
- <div><div class="authorgroup"><div class="author"><h3 class="author">
- <span class="firstname">David</span> <span class="surname">Abrahams</span>
- </h3></div></div></div>
- <div><p class="copyright">Copyright © 2002-2015 David Abrahams, Stefan Seefeld</p></div>
- </div></div>
- <div class="toc"><dl class="toc">
- <dt><span class="section"><a href="configuration.html#configuration.configuration">Configuration</a></span></dt>
- <dd><dl>
- <dt><span class="section"><a href="configuration.html#configuration.configuration.introduction">Introduction</a></span></dt>
- <dt><span class="section"><a href="configuration.html#configuration.configuration.application_defined_macros">Application
- Defined Macros</a></span></dt>
- <dt><span class="section"><a href="configuration.html#configuration.configuration.library_defined_defined_macros">Library
- Defined Defined Macros</a></span></dt>
- </dl></dd>
- </dl></div>
- <div class="section">
- <div class="titlepage"><div><div><h3 class="title">
- <a name="configuration.configuration"></a><a class="link" href="configuration.html#configuration.configuration" title="Configuration">Configuration</a>
- </h3></div></div></div>
- <div class="toc"><dl class="toc">
- <dt><span class="section"><a href="configuration.html#configuration.configuration.introduction">Introduction</a></span></dt>
- <dt><span class="section"><a href="configuration.html#configuration.configuration.application_defined_macros">Application
- Defined Macros</a></span></dt>
- <dt><span class="section"><a href="configuration.html#configuration.configuration.library_defined_defined_macros">Library
- Defined Defined Macros</a></span></dt>
- </dl></div>
- <div class="section">
- <div class="titlepage"><div><div><h4 class="title">
- <a name="configuration.configuration.introduction"></a><a class="link" href="configuration.html#configuration.configuration.introduction" title="Introduction">Introduction</a>
- </h4></div></div></div>
- <p>
- <span class="bold"><strong>Boost.Python</strong></span> uses several configuration
- macros in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>, as well as configuration macros meant
- to be supplied by the application. These macros are documented here.
- </p>
- </div>
- <div class="section">
- <div class="titlepage"><div><div><h4 class="title">
- <a name="configuration.configuration.application_defined_macros"></a><a class="link" href="configuration.html#configuration.configuration.application_defined_macros" title="Application Defined Macros">Application
- Defined Macros</a>
- </h4></div></div></div>
- <p>
- These are the macros that may be defined by an application using Boost.Python.
- Note that if you extend a strict interpretation of the C++ standard to
- cover dynamic libraries, using different values of these macros when compiling
- different libraries (including extension modules and the Boost.Python library
- itself) is a violation of the <a class="link" href="glossary.html#odr">ODR</a>. However,
- we know of no C++ implementations on which this particular violation is
- detectable or causes any problems.
- </p>
- <div class="informaltable"><table class="table">
- <colgroup>
- <col>
- <col>
- <col>
- </colgroup>
- <thead><tr>
- <th>
- <p>
- Macro
- </p>
- </th>
- <th>
- <p>
- Default
- </p>
- </th>
- <th>
- <p>
- Meaning
- </p>
- </th>
- </tr></thead>
- <tbody>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_MAX_ARITY
- </p>
- </td>
- <td>
- <p>
- 15
- </p>
- </td>
- <td>
- <p>
- The maximum arity of any function, member function, or constructor
- to be wrapped, invocation of a Boost.Python function wich is
- specified as taking arguments x1, x2,...Xn. This includes, in
- particular, callback mechanisms such as object::operator()(...)
- or call_method<R>(... ).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_MAX_BASES
- </p>
- </td>
- <td>
- <p>
- 10
- </p>
- </td>
- <td>
- <p>
- The maximum number of template arguments to the <code class="computeroutput"><span class="identifier">bases</span><span class="special"><...></span></code>
- class template, which is used to specify the bases of a wrapped
- C++ class..
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_STATIC_MODULE
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined, prevents your module initialization function from
- being treated as an exported symbol on platforms which support
- that distinction in-code
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_ENABLE_CDECL
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined, allows functions using the <code class="computeroutput"><span class="identifier">__cdecl</span></code>
- calling convention to be wrapped.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_ENABLE_STDCALL
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined, allows functions using the <code class="computeroutput"><span class="identifier">__stdcall</span></code>
- calling convention to be wrapped.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_ENABLE_FASTCALL
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined, allows functions using the <code class="computeroutput"><span class="identifier">__fastcall</span></code>
- calling convention to be wrapped.
- </p>
- </td>
- </tr>
- </tbody>
- </table></div>
- </div>
- <div class="section">
- <div class="titlepage"><div><div><h4 class="title">
- <a name="configuration.configuration.library_defined_defined_macros"></a><a class="link" href="configuration.html#configuration.configuration.library_defined_defined_macros" title="Library Defined Defined Macros">Library
- Defined Defined Macros</a>
- </h4></div></div></div>
- <p>
- These macros are defined by <span class="bold"><strong>Boost.Python</strong></span>
- and are implementation details of interest only to implementors and those
- porting to new platforms.
- </p>
- <div class="informaltable"><table class="table">
- <colgroup>
- <col>
- <col>
- <col>
- </colgroup>
- <thead><tr>
- <th>
- <p>
- Macro
- </p>
- </th>
- <th>
- <p>
- Default
- </p>
- </th>
- <th>
- <p>
- Meaning
- </p>
- </th>
- </tr></thead>
- <tbody>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_TYPE_ID_NAME
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined, this indicates that the type_info comparison across
- shared library boundaries does not work on this platform. In
- other words, if shared-lib-1 passes <code class="computeroutput"><span class="keyword">typeid</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code> to a function in shared-lib-2
- which compares it to <code class="computeroutput"><span class="keyword">typeid</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span></code>, that comparison may return
- <code class="computeroutput"><span class="keyword">false</span></code>. If this macro
- is #defined, Boost.Python uses and compares <code class="computeroutput"><span class="keyword">typeid</span><span class="special">(</span><span class="identifier">T</span><span class="special">).</span><span class="identifier">name</span><span class="special">()</span></code> instead of using and comparing
- the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">type_info</span></code> objects directly.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_NO_PY_SIGNATURES
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined for a module no pythonic signatures are generated
- for the docstrings of the module functions, and no python type
- is associated with any of the converters registered by the module.
- This also reduces the binary size of the module by about 14%
- (gcc compiled). If defined for the boost_python runtime library,
- the default for the <code class="computeroutput"><span class="identifier">docstring_options</span><span class="special">.</span><span class="identifier">enable_py_signatures</span><span class="special">()</span></code> is set to <code class="computeroutput"><span class="keyword">false</span></code>.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_SUPPORTS_PY_SIGNATURES
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>defined</em></span> if <code class="computeroutput"><span class="identifier">BOOST_PYTHON_NO_PY_SIGNATURES</span></code>
- is <span class="emphasis"><em>undefined</em></span>
- </p>
- </td>
- <td>
- <p>
- This macro is defined to enable a smooth transition from older
- Boost.Python versions which do not support pythonic signatures.
- For example usage see here.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE
- </p>
- </td>
- <td>
- <p>
- <span class="emphasis"><em>not defined</em></span>
- </p>
- </td>
- <td>
- <p>
- If defined the python type of <code class="computeroutput"><span class="identifier">__init__</span></code>
- method "self" parameters is properly generated, otherwise
- object is used. It is undefined by default because it increases
- the binary size of the module by about 14% (gcc compiled).
- </p>
- </td>
- </tr>
- </tbody>
- </table></div>
- </div>
- </div>
- </div>
- <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
- <td align="left"></td>
- <td align="right"><div class="copyright-footer">Copyright © 2002-2015 David
- Abrahams, Stefan Seefeld<p>
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
- </p>
- </div></td>
- </tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="building/notes_for_mingw_and_cygwin_with_.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="support.html"><img src="images/next.png" alt="Next"></a>
- </div>
- </body>
- </html>
|