Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

C++ Boost

Boost.Python

Configuration


Introduction
Application Defined Macros
Library Defined Implementation Macros

Introduction

Boost.Python uses several configuration macros in <boost/config.hpp>, as well as configuration macros meant to be supplied by the application. These macros are documented here.

Application Defined Macros

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 ODR. However, we know of no C++ implementations on which this particular violation is detectable or causes any problems.

Macro Default Meaning
BOOST_PYTHON_MAX_ARITY 15 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>(... ).
BOOST_PYTHON_MAX_BASES 10 The maximum number of template arguments to the bases<...> class template, which is used to specify the bases of a wrapped C++ class..
BOOST_PYTHON_STATIC_MODULE not defined If defined, prevents your module initialization function from being treated as an exported symbol on platforms which support that distinction in-code

Library Defined Implementation Macros

These macros are defined by Boost.Python and are implementation details of interest only to implementors and those porting to new platforms.

Macro Default Meaning
BOOST_PYTHON_TYPE_ID_NAME not defined 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 typeid(T) to a function in shared-lib-2 which compares it to typeid(T), that comparison may return false. If this macro is #defined, Boost.Python uses and compares typeid(T).name() instead of using and comparing the std::type_info objects directly.

Revised 7 January, 2003

© Copyright Dave Abrahams 2002. All Rights Reserved.