File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ Interpreter Locks
300300
301301 This type is guaranteed to be pointer-sized.
302302
303- .. c :function :: PyInterpreterLock PyInterpreterLock_AcquireCurrent (void)
303+ .. c :function :: PyInterpreterLock PyInterpreterLock_FromCurrent (void)
304304
305305 Acquire a lock for the current interpreter.
306306
@@ -556,7 +556,7 @@ held. Any future finalizer that attempted to acquire the lock would be deadlocke
556556 my_critical_operation(PyObject *self, PyObject *Py_UNUSED(args))
557557 {
558558 assert(PyThreadState_GetUnchecked() != NULL);
559- PyInterpreterLock lock = PyInterpreterLock_AcquireCurrent ();
559+ PyInterpreterLock lock = PyInterpreterLock_FromCurrent ();
560560 if (lock == 0) {
561561 /* Python interpreter has shut down */
562562 return NULL;
@@ -639,7 +639,7 @@ This is the same code, rewritten to use the new functions:
639639 PyThread_handle_t handle;
640640 PyThead_indent_t indent;
641641
642- PyInterpreterLock lock = PyInterpreterLock_AcquireCurrent ();
642+ PyInterpreterLock lock = PyInterpreterLock_FromCurrent ();
643643 if (lock == 0) {
644644 return NULL;
645645 }
@@ -690,7 +690,7 @@ hang the current thread forever).
690690 PyThread_handle_t handle;
691691 PyThead_indent_t indent;
692692
693- PyInterpreterLock lock = PyInterpreterLock_AcquireCurrent ();
693+ PyInterpreterLock lock = PyInterpreterLock_FromCurrent ();
694694 if (lock == 0) {
695695 return NULL;
696696 }
You can’t perform that action at this time.
0 commit comments