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:
318318
319319 A new ``PyType_GetModuleByToken `` function will be added, with a signature
320320like 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.
322323
323324For 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.
327330(The ``PyModule_GetDef `` function will not get a similar change, as users may
328331access members of its result.)
329332
You can’t perform that action at this time.
0 commit comments