mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
gh-90667: Add specializations of Py_DECREF when types are known (GH-30872)
This commit is contained in:
parent
ab0d35d70d
commit
da6c78584b
13 changed files with 147 additions and 85 deletions
|
@ -48,9 +48,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "pycore_initconfig.h" // _PyStatus_OK()
|
||||
#include "pycore_interp.h" // PyInterpreterState.fs_codec
|
||||
#include "pycore_long.h" // _PyLong_FormatWriter()
|
||||
#include "pycore_object.h" // _PyObject_GC_TRACK()
|
||||
#include "pycore_object.h" // _PyObject_GC_TRACK(), _Py_FatalRefcountError()
|
||||
#include "pycore_pathconfig.h" // _Py_DumpPathConfig()
|
||||
#include "pycore_pyerrors.h" // _Py_FatalRefcountError()
|
||||
#include "pycore_pylifecycle.h" // _Py_SetFileSystemEncoding()
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
|
||||
|
@ -15369,6 +15368,13 @@ onError:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_PyUnicode_ExactDealloc(PyObject *op)
|
||||
{
|
||||
assert(PyUnicode_CheckExact(op));
|
||||
unicode_dealloc(op);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(unicode_doc,
|
||||
"str(object='') -> str\n\
|
||||
str(bytes_or_buffer[, encoding[, errors]]) -> str\n\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue