# Limited C API: implement Py\_INCREF() and Py\_DECREF() as function calls

**URL:** <https://discuss.python.org/t/limited-c-api-implement-py-incref-and-py-decref-as-function-calls/27592>\
**Category:** C API\
**Created:** [June 9, 2023, 10:26am UTC](https://discuss.python.org/t/limited-c-api-implement-py-incref-and-py-decref-as-function-calls/27592 "2023-06-09T10:26:16Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![vstinner](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/vstinner/32/15130_2.png) [@vstinner](https://discuss.python.org/u/vstinner)\
**Post date:** [June 17, 2024, 4:07pm UTC](https://discuss.python.org/t/limited-c-api-implement-py-incref-and-py-decref-as-function-calls/27592/21 "2024-06-17T16:07:09Z")

</div>

Follow-up: I wrote [PR gh-120601](https://github.com/python/cpython/pull/120601) to convert the `Py_TYPE()` macro to an opaque function in the limited C API version 3.14 and newer.

[Previous page](https://discuss.python.org/t/limited-c-api-implement-py-incref-and-py-decref-as-function-calls/27592.md?page=1)
