Skip to content

Commit

Permalink
Add TODOs for missing Py_DECREF specializations
Browse files Browse the repository at this point in the history
These aren't necessary for correctness, just performance.
  • Loading branch information
colesbury committed Oct 27, 2023
1 parent bb42e59 commit d0b6720
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ _Py_DECREF_NO_DEALLOC(PyObject *op)
}

#else
// TODO: implement Py_DECREF specializations for Py_NOGIL build
static inline void
_Py_DECREF_SPECIALIZED(PyObject *op, const destructor destruct)
{
Expand Down
1 change: 1 addition & 0 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
// the limit of PGO, and that limit cannot be configured.
// Define them as macros to make sure that they are always inlined by the
// preprocessor.
// TODO: implement Py_DECREF macro for Py_NOGIL

#undef Py_DECREF
#define Py_DECREF(arg) \
Expand Down

0 comments on commit d0b6720

Please sign in to comment.