#ifndef Py_INTERNAL_WEAKREF_H
#define Py_INTERNAL_WEAKREF_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
#include "pycore_critical_section.h"
#include "pycore_lock.h"
#include "pycore_object.h"
#include "pycore_pyatomic_ft_wrappers.h"
#ifdef Py_GIL_DISABLED
#define WEAKREF_LIST_LOCK …
#define LOCK_WEAKREFS …
#define UNLOCK_WEAKREFS …
#define LOCK_WEAKREFS_FOR_WR …
#define UNLOCK_WEAKREFS_FOR_WR …
#else
#define LOCK_WEAKREFS(obj) …
#define UNLOCK_WEAKREFS(obj) …
#define LOCK_WEAKREFS_FOR_WR(wr) …
#define UNLOCK_WEAKREFS_FOR_WR(wr) …
#endif
static inline int _is_dead(PyObject *obj)
{ … }
static inline PyObject* _PyWeakref_GET_REF(PyObject *ref_obj)
{ … }
static inline int _PyWeakref_IS_DEAD(PyObject *ref_obj)
{ … }
extern Py_ssize_t _PyWeakref_GetWeakrefCount(PyObject *obj);
extern void _PyWeakref_ClearWeakRefsNoCallbacks(PyObject *obj);
PyAPI_FUNC(int) _PyWeakref_IsDead(PyObject *weakref);
#ifdef __cplusplus
}
#endif
#endif