summaryrefslogtreecommitdiff
path: root/libs/python/doc/html/configuration.html
blob: 2fe794e42a3da2abcc64a5aa2b9ee5af1894f4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;3.&#160;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&#160;4.&#160;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&#160;3.&#160;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 &#169; 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">&lt;</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">&gt;</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&lt;R&gt;(... ).
                  </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">&lt;...&gt;</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 &#169; 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>