You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The datetime.h header file provides two kinds of C API:
Function pointers exposed via PyDateTime_CAPI structure and a PyCapsule object
Macros like PyTime_Check() and PyTime_FromTime(): their implementation uses the function pointers
I propose converting these macros to regular functions to avoid leaking implementation details in the ABI. It moves this API closer to the limited C API and the stable ABI (PEP 384).
I propose a first PR to convert macros like PyTime_FromTime() to regular functions.
Later, I also plan to work on a separated PR to convert "GET" macros, like PyDateTime_GET_YEAR(), to static inline functions or regular functions.
Note: currently, datetime.h is not included by Python.h and is excluded from the limited C API.
The text was updated successfully, but these errors were encountered:
I propose a first PR to convert macros like PyTime_FromTime() to regular functions.
Oh, wait. The _datetime extension is built as a shared library, my idea doesn't work... When I built again my local branches, _zoneinfo and _testcapi fail to build.
The
datetime.h
header file provides two kinds of C API:I propose converting these macros to regular functions to avoid leaking implementation details in the ABI. It moves this API closer to the limited C API and the stable ABI (PEP 384).
I propose a first PR to convert macros like PyTime_FromTime() to regular functions.
Later, I also plan to work on a separated PR to convert "GET" macros, like PyDateTime_GET_YEAR(), to static inline functions or regular functions.
Note: currently,
datetime.h
is not included byPython.h
and is excluded from the limited C API.The text was updated successfully, but these errors were encountered: