summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-12 19:51:34 (GMT)
committerGitHub <noreply@github.com>2019-04-12 19:51:34 (GMT)
commit0fc91eef34a1d9194904fa093c9fbd711af0f26c (patch)
treebeec907827203135c5c5baa9303fcb27776088a3 /Include/internal
parent23a683adf803eef405d248cc9c2a7eb08a7300e2 (diff)
downloadcpython-0fc91eef34a1d9194904fa093c9fbd711af0f26c.zip
cpython-0fc91eef34a1d9194904fa093c9fbd711af0f26c.tar.gz
cpython-0fc91eef34a1d9194904fa093c9fbd711af0f26c.tar.bz2
bpo-36389: Add _PyObject_CheckConsistency() function (GH-12803)
Add a new _PyObject_CheckConsistency() function which can be used to help debugging. The function is available in release mode. Add a 'check_content' parameter to _PyDict_CheckConsistency().
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_object.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index a88b626..c955953 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -10,6 +10,10 @@ extern "C" {
#include "pycore_pystate.h" /* _PyRuntime */
+PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type);
+PyAPI_FUNC(int) _PyUnicode_CheckConsistency(PyObject *op, int check_content);
+PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content);
+
/* Tell the GC to track this object.
*
* NB: While the object is tracked by the collector, it must be safe to call the