Skip to content

Commit

Permalink
Work around c-analyzer limitation
Browse files Browse the repository at this point in the history
When we have `typedef struct _PyEventRc _PyEventRc` in `pstate.h`
the C analyzer can't decide between that and the definition in `pycore_lock.h`.
  • Loading branch information
mpage committed Feb 5, 2024
1 parent 1039208 commit 196081d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ struct _py_trashcan {
PyObject *delete_later;
};

typedef struct _PyEventRc _PyEventRc;

struct _ts {
/* See Python/ceval.c for comments explaining most fields */

Expand Down Expand Up @@ -164,7 +162,7 @@ struct _ts {
int is_daemon;

/* Set when the thread has finished execution and is about to be freed. */
_PyEventRc *done_event;
struct _PyEventRc *done_event;

int coroutine_origin_tracking_depth;

Expand Down

0 comments on commit 196081d

Please sign in to comment.