pep-567: Tweak C API (#555)

* Rename PyContext_Copy() to PyContext_CopyCurrent()
* Add new PyContext_Copy(PyContext *)
This commit is contained in:
Yury Selivanov 2018-01-21 15:39:33 -05:00 committed by Guido van Rossum
parent a597430349
commit a459539920
1 changed files with 6 additions and 2 deletions

View File

@ -556,9 +556,13 @@ C API
5. ``PyContext * PyContext_New()``: create a new empty context.
6. ``PyContext * PyContext_Copy()``: get a copy of the current context.
6. ``PyContext * PyContext_Copy(PyContext *)``: return a shallow
copy of the passed context object.
7. ``int PyContext_Enter(PyContext *)`` and
7. ``PyContext * PyContext_CopyCurrent()``: get a copy of the current
context.
8. ``int PyContext_Enter(PyContext *)`` and
``int PyContext_Exit(PyContext *)`` allow to set and restore
the context for the current OS thread. It is required to always
restore the previous context::