Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Mar 29, 2024
1 parent 5e7c8bb commit 37c9529
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Include/cpython/weakrefobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct _PyWeakReference {
* Normally this can be derived from wr_object, but in some cases we need
* to lock after wr_object has been set to Py_None.
*/
struct _PyMutex *weakrefs_lock;
struct _PyMutex *weakrefs_lock;
#endif
};

Expand Down
6 changes: 3 additions & 3 deletions Objects/weakrefobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ insert_head(PyWeakReference *newref, PyWeakReference **list)
* creating a new weakref
*/
static PyWeakReference *
try_reuse_basic_ref(PyWeakReference *list, PyTypeObject *type, PyObject *callback)
try_reuse_basic_ref(PyWeakReference *list, PyTypeObject *type,
PyObject *callback)
{
if (callback != NULL) {
return NULL;
Expand Down Expand Up @@ -1125,8 +1126,7 @@ _PyWeakref_ClearWeakRefsExceptCallbacks(PyObject *obj)
This is never triggered for static types so we can avoid the
(slightly) more costly _PyObject_GET_WEAKREFS_LISTPTR(). */
PyWeakReference **list = \
_PyObject_GET_WEAKREFS_LISTPTR_FROM_OFFSET(obj);
PyWeakReference **list = _PyObject_GET_WEAKREFS_LISTPTR_FROM_OFFSET(obj);
LOCK_WEAKREFS(obj);
while (*list) {
_PyWeakref_ClearRef(*list);
Expand Down

0 comments on commit 37c9529

Please sign in to comment.