@@ -24,7 +24,7 @@ interpreter. For example:
2424 static int
2525 thread_function(PyInterpreterView view)
2626 {
27- PyInterpreterLock lock = PyInterpreterLock_AcquireView (view);
27+ PyInterpreterLock lock = PyInterpreterLock_FromView (view);
2828 if (lock == 0) {
2929 return -1;
3030 }
@@ -310,7 +310,7 @@ Interpreter Locks
310310 The caller must hold an :term:`attached thread state`.
311311
312312
313- .. c:function:: PyInterpreterLock PyInterpreterLock_AcquireView (PyInterpreterView view)
313+ .. c:function:: PyInterpreterLock PyInterpreterLock_FromView (PyInterpreterView view)
314314
315315 Acquire a lock to an interpreter through a view.
316316
@@ -364,7 +364,7 @@ Interpreter Views
364364 Create a view to the current interpreter.
365365
366366 This function is generally meant to be used in tandem with
367- :c:func:`PyInterpreterLock_AcquireView `.
367+ :c:func:`PyInterpreterLock_FromView `.
368368
369369 On success, this function returns a view to the current
370370 interpreter, and returns ``0`` with an exception set on failure.
@@ -508,7 +508,7 @@ With this PEP, you would implement it like this:
508508 PyObject *file,
509509 PyObject *text)
510510 {
511- PyInterpreterLock lock = PyInterpreterLock_AcquireView (view);
511+ PyInterpreterLock lock = PyInterpreterLock_FromView (view);
512512 if (lock == 0) {
513513 / * Python interpreter has shut down */
514514 return -1;
@@ -716,7 +716,7 @@ Example: An Asynchronous Callback
716716 {
717717 ThreadData *tdata = (ThreadData *)arg;
718718 PyInterpreterView view = tdata->view;
719- PyInterpreterLock lock = PyInterpreterLock_AcquireView (view);
719+ PyInterpreterLock lock = PyInterpreterLock_FromView (view);
720720 if (lock == 0) {
721721 fputs("Python has shut down!\n", stderr);
722722 return -1;
0 commit comments