Scarab  v2.9.0
Project 8 C++ Utility Library
Classes | Namespaces | Macros | Typedefs | Functions
internals.h File Reference
#include "../pytypes.h"
Include dependency graph for internals.h:

Go to the source code of this file.

Classes

struct  type_hash
 
struct  type_equal_to
 
struct  overload_hash
 
struct  internals
 
struct  type_info
 

Namespaces

 pybind11
 glibc defines I as a macro which breaks things, e.g., boost template names
 
 pybind11::detail
 

Macros

#define PYBIND11_TLS_KEY_INIT(var)   decltype(PyThread_create_key()) var = 0
 
#define PYBIND11_TLS_GET_VALUE(key)   PyThread_get_key_value((key))
 
#define PYBIND11_TLS_DELETE_VALUE(key)   PyThread_delete_key_value(key)
 
#define PYBIND11_TLS_REPLACE_VALUE(key, value)
 
#define PYBIND11_INTERNALS_VERSION   3
 Tracks the internals and type_info ABI version independent of the main library version. More...
 
#define PYBIND11_BUILD_TYPE   ""
 On MSVC, debug and release builds are not ABI-compatible! More...
 
#define PYBIND11_BUILD_ABI   ""
 On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility. More...
 
#define PYBIND11_INTERNALS_KIND   "_without_thread"
 
#define PYBIND11_INTERNALS_ID
 
#define PYBIND11_MODULE_LOCAL_ID
 

Typedefs

template<typename value_type >
using type_map = std::unordered_map< std::type_index, value_type, type_hash, type_equal_to >
 

Functions

PyTypeObject * make_static_property_type ()
 
PyTypeObject * make_default_metaclass ()
 
PyObject * make_object_base_type (PyTypeObject *metaclass)
 
bool same_type (const std::type_info &lhs, const std::type_info &rhs)
 
internals **& get_internals_pp ()
 
void translate_exception (std::exception_ptr p)
 
void translate_local_exception (std::exception_ptr p)
 
 __attribute__ ((noinline)) inline internals &get_internals()
 Return a reference to the current internals data. More...
 
type_map< type_info * > & registered_local_types_cpp ()
 Works like internals.registered_types_cpp, but for module-local registered types: More...
 
template<typename... Args>
const char * c_str (Args &&...args)
 
 __attribute__ ((noinline)) inline void pybind11_fail(const char *reason)
 Used internally. More...
 
template<typename T >
T & get_or_create_shared_data (const std::string &name)
 

Macro Definition Documentation

◆ PYBIND11_BUILD_ABI

#define PYBIND11_BUILD_ABI   ""

On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility.

Definition at line 154 of file internals.h.

◆ PYBIND11_BUILD_TYPE

#define PYBIND11_BUILD_TYPE   ""

On MSVC, debug and release builds are not ABI-compatible!

Definition at line 147 of file internals.h.

◆ PYBIND11_INTERNALS_ID

#define PYBIND11_INTERNALS_ID
Value:
"__pybind11_internals_v" \
#define PYBIND11_BUILD_ABI
On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility.
Definition: internals.h:154
#define PYBIND11_INTERNALS_KIND
Definition: internals.h:160
#define PYBIND11_INTERNALS_VERSION
Tracks the internals and type_info ABI version independent of the main library version.
Definition: internals.h:141
#define PYBIND11_BUILD_TYPE
On MSVC, debug and release builds are not ABI-compatible!
Definition: internals.h:147

Definition at line 163 of file internals.h.

◆ PYBIND11_INTERNALS_KIND

#define PYBIND11_INTERNALS_KIND   "_without_thread"

Definition at line 160 of file internals.h.

◆ PYBIND11_INTERNALS_VERSION

#define PYBIND11_INTERNALS_VERSION   3

Tracks the internals and type_info ABI version independent of the main library version.

Definition at line 141 of file internals.h.

◆ PYBIND11_MODULE_LOCAL_ID

#define PYBIND11_MODULE_LOCAL_ID
Value:
"__pybind11_module_local_v" \
#define PYBIND11_BUILD_ABI
On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility.
Definition: internals.h:154
#define PYBIND11_INTERNALS_KIND
Definition: internals.h:160
#define PYBIND11_INTERNALS_VERSION
Tracks the internals and type_info ABI version independent of the main library version.
Definition: internals.h:141
#define PYBIND11_BUILD_TYPE
On MSVC, debug and release builds are not ABI-compatible!
Definition: internals.h:147

Definition at line 166 of file internals.h.

◆ PYBIND11_TLS_DELETE_VALUE

#define PYBIND11_TLS_DELETE_VALUE (   key)    PyThread_delete_key_value(key)

Definition at line 33 of file internals.h.

◆ PYBIND11_TLS_GET_VALUE

#define PYBIND11_TLS_GET_VALUE (   key)    PyThread_get_key_value((key))

Definition at line 31 of file internals.h.

◆ PYBIND11_TLS_KEY_INIT

#define PYBIND11_TLS_KEY_INIT (   var)    decltype(PyThread_create_key()) var = 0

Definition at line 30 of file internals.h.

◆ PYBIND11_TLS_REPLACE_VALUE

#define PYBIND11_TLS_REPLACE_VALUE (   key,
  value 
)
Value:
do { \
PyThread_delete_key_value((key)); \
PyThread_set_key_value((key), (value)); \
} while (false)

Definition at line 35 of file internals.h.