diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-01-06 11:47:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 11:47:28 (GMT) |
commit | fe9f446afe46bd716592eda9fa2af8d9f46bbce4 (patch) | |
tree | 60d215c0e59eeb8c54062e4486dc496fbabfc416 /Include | |
parent | 315fc52db17b19fe30aa9193f26adf69e18d8844 (diff) | |
download | cpython-fe9f446afe46bd716592eda9fa2af8d9f46bbce4.zip cpython-fe9f446afe46bd716592eda9fa2af8d9f46bbce4.tar.gz cpython-fe9f446afe46bd716592eda9fa2af8d9f46bbce4.tar.bz2 |
bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pydecimal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/pydecimal.h b/Include/pydecimal.h index 9b6440e..f82e41f 100644 --- a/Include/pydecimal.h +++ b/Include/pydecimal.h @@ -66,6 +66,8 @@ typedef struct { /* Capsule API */ /****************************************************************************/ +#define PyDec_CAPSULE_NAME "_decimal._API" + /* Simple API */ #define PyDec_TypeCheck_INDEX 0 #define PyDec_TypeCheck_RETURN int @@ -164,7 +166,7 @@ static void **_decimal_api; static int import_decimal(void) { - _decimal_api = (void **)PyCapsule_Import("_decimal._API", 0); + _decimal_api = (void **)PyCapsule_Import(PyDec_CAPSULE_NAME, 0); if (_decimal_api == NULL) { return -1; } |