|
6 | 6 | * This functionality is intended to be used by the framework itself, |
7 | 7 | * rather than by users of the framework. |
8 | 8 | * |
9 | | - * This is version 0.1 of pymetabind. Changelog: |
| 9 | + * This is version 0.1+dev of pymetabind. Changelog: |
| 10 | + * |
| 11 | + * Unreleased: Fix typo in Py_GIL_DISABLED. Add pymb_framework::leak_safe. |
| 12 | + * Add casts from PyTypeObject* to PyObject* where needed. |
10 | 13 | * |
11 | 14 | * Version 0.1: Initial draft. ABI may change without warning while we |
12 | 15 | * 2025-08-16 prove out the concept. Please wait for a 1.0 release |
@@ -195,7 +198,7 @@ struct pymb_registry { |
195 | 198 | #endif |
196 | 199 | }; |
197 | 200 |
|
198 | | -#if defined(Py_GIL_DISALED) |
| 201 | +#if defined(Py_GIL_DISABLED) |
199 | 202 | inline void pymb_lock_registry(struct pymb_registry* registry) { |
200 | 203 | PyMutex_Lock(®istry->mutex); |
201 | 204 | } |
@@ -250,8 +253,15 @@ struct pymb_framework { |
250 | 253 | // this framework's bindings in free-threaded builds. |
251 | 254 | uint8_t bindings_usable_forever; |
252 | 255 |
|
| 256 | + // Does this framework reliably deallocate all of its type and function |
| 257 | + // objects by the time the Python interpreter is finalized, in the absence |
| 258 | + // of bugs in user code? If not, it might cause leaks of other frameworks' |
| 259 | + // types or functions, via attributes or default argument values for |
| 260 | + // this framework's leaked objects. |
| 261 | + uint8_t leak_safe; |
| 262 | + |
253 | 263 | // Reserved for future extensions. Set to 0. |
254 | | - uint8_t reserved[3]; |
| 264 | + uint8_t reserved[2]; |
255 | 265 |
|
256 | 266 | // The language to which this framework provides bindings: one of the |
257 | 267 | // `pymb_abi_lang` enumerators. |
|
0 commit comments