@@ -286,41 +286,42 @@ PyAPI_FUNC(void) _PyInterpreterState_SetEvalFrameFunc(
286286
287287typedef uintptr_t PyInterpreterLock ;
288288
289- PyAPI_FUNC (int ) PyInterpreterLock_FromCurrent (PyInterpreterLock * ref );
290- PyAPI_FUNC (PyInterpreterLock ) PyInterpreterLock_Copy (PyInterpreterLock ref );
291- PyAPI_FUNC (int ) PyUnstable_InterpreterView_FromDefault (PyInterpreterLock * ref );
292- PyAPI_FUNC (void ) PyInterpreterLock_Release (PyInterpreterLock ref );
293- PyAPI_FUNC (PyInterpreterState * ) PyInterpreterLock_GetInterpreter ( PyInterpreterLock ref );
294-
295- #define PyInterpreterLock_Release (ref ) do { \
296- PyInterpreterLock_Release(ref ); \
297- ref = 0; \
289+ PyAPI_FUNC (PyInterpreterLock ) PyInterpreterLock_FromCurrent (void );
290+ PyAPI_FUNC (PyInterpreterLock ) PyInterpreterLock_Copy (PyInterpreterLock lock );
291+ PyAPI_FUNC (void ) PyInterpreterLock_Release (PyInterpreterLock lock );
292+ PyAPI_FUNC (PyInterpreterState * ) PyInterpreterLock_GetInterpreter (PyInterpreterLock lock );
293+ PyAPI_FUNC (PyInterpreterLock ) PyInterpreterLock_FromView ( PyInterpreterView view );
294+
295+ #define PyInterpreterLock_Release (lock ) do { \
296+ PyInterpreterLock_Release(lock ); \
297+ ref = 0; \
298298} while (0)
299299
300- /* Weak interpreter references */
300+ /* Interpreter views */
301301
302302typedef struct _PyInterpreterView {
303303 int64_t id ;
304304 Py_ssize_t refcount ;
305305} _PyInterpreterView ;
306306
307- typedef _PyInterpreterView * PyInterpreterView ;
307+ typedef uintptr_t PyInterpreterView ;
308308
309- PyAPI_FUNC (int ) PyInterpreterView_FromCurrent (PyInterpreterView * ptr );
310- PyAPI_FUNC (PyInterpreterView ) PyInterpreterView_Copy (PyInterpreterView wref );
311- PyAPI_FUNC (int ) PyInterpreterLock_FromView (PyInterpreterView wref , PyInterpreterLock * strong_ptr );
312- PyAPI_FUNC (void ) PyInterpreterView_Close ( PyInterpreterView wref );
309+ PyAPI_FUNC (PyInterpreterView ) PyInterpreterView_FromCurrent (void );
310+ PyAPI_FUNC (PyInterpreterView ) PyInterpreterView_Copy (PyInterpreterView view );
311+ PyAPI_FUNC (void ) PyInterpreterView_Close (PyInterpreterView view );
312+ PyAPI_FUNC (PyInterpreterView ) PyUnstable_InterpreterView_FromDefault ( void );
313313
314- #define PyInterpreterView_Close (ref ) do { \
315- PyInterpreterView_Close(ref); \
316- ref = 0; \
314+
315+ #define PyInterpreterView_Close (view ) do { \
316+ PyInterpreterView_Close(view); \
317+ ref = 0; \
317318} while (0)
318319
319320
320- /* Thread references */
321+ /* Thread views */
321322
322323typedef uintptr_t PyThreadView ;
323324
324- PyAPI_FUNC (int ) PyThreadState_Ensure (PyInterpreterLock interp_ref , PyThreadView * thread_ref );
325+ PyAPI_FUNC (PyThreadView ) PyThreadState_Ensure (PyInterpreterLock lock );
325326
326327PyAPI_FUNC (void ) PyThreadState_Release (PyThreadView thread_ref );
0 commit comments