Sitelet https://web.archive.org/web/20220607084245/https://github.com/python/cpython/tree/main/Include
Skip to content
main
Switch branches/tags
cpython/Include/
cpython/Include/

Latest commit

Add C++ overloads for _Py_CAST_impl() to handle 0/NULL.  This will allow
C++ extensions that pass 0 or NULL to macros using _Py_CAST() to
continue to compile.  Without this, you get an error like:

    invalid ‘static_cast’ from type ‘int’ to type ‘_object*’

The modern way to use a NULL value in C++ is to use nullptr.  However,
we want to not break extensions that do things the old way.

Co-authored-by: serge-sans-paille
8bcc3fa

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

The Python C API

The C API is divided into three sections:

  1. Include/: Limited API
  2. Include/cpython/: CPython implementation details
  3. Include/internal/: The internal API

Information on changing the C API is available in the developer guide