File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -318,12 +318,15 @@ will return 0 on success and -1 on failure:
318
318
319
319
A new ``PyType_GetModuleByToken `` function will be added, with a signature
320
320
like the existing ``PyType_GetModuleByDef `` but a ``void *token `` argument,
321
- and the same behaviour except matching tokens rather than only defs.
321
+ and the same behaviour except matching tokens rather than only defs,
322
+ and returning a strong reference.
322
323
323
324
For easier backwards compatibility, the existing ``PyType_GetModuleByDef ``
324
- will be changed to work exactly like ``PyType_GetModuleByToken `` -- that is,
325
- it will allow a token (cast to a ``PyModuleDef * `` pointer) as the
326
- *def * argument.
325
+ will be changed to also allow a token (cast to a ``PyModuleDef * `` pointer) as
326
+ the *def * argument.
327
+ That is, ``PyType_GetModuleByToken `` and ``PyType_GetModuleByDef `` will differ
328
+ only in the formal signature of the second argument and by returning a
329
+ borrowed vs. strong reference.
327
330
(The ``PyModule_GetDef `` function will not get a similar change, as users may
328
331
access members of its result.)
329
332
You can’t perform that action at this time.
0 commit comments