summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-25 22:56:17 (GMT)
committerGitHub <noreply@github.com>2018-11-25 22:56:17 (GMT)
commitec13b9322d95a651606219469fc7b7e9c977f248 (patch)
tree3fe923cfef5fafe9b5cba193b9dc54b8fd3c7bc2 /Include/internal
parent8ac6539d85b481fc6b5e9145446b07e591b2caba (diff)
downloadcpython-ec13b9322d95a651606219469fc7b7e9c977f248.zip
cpython-ec13b9322d95a651606219469fc7b7e9c977f248.tar.gz
cpython-ec13b9322d95a651606219469fc7b7e9c977f248.tar.bz2
bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)
Move _PyTuple_ITEMS() to a new header file: Include/internal/pycore_tupleobject.h
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_tupleobject.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Include/internal/pycore_tupleobject.h b/Include/internal/pycore_tupleobject.h
new file mode 100644
index 0000000..fdd7414
--- /dev/null
+++ b/Include/internal/pycore_tupleobject.h
@@ -0,0 +1,18 @@
+#ifndef Py_INTERNAL_TUPLEOBJECT_H
+#define Py_INTERNAL_TUPLEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
+# error "this header requires Py_BUILD_CORE or Py_BUILD_CORE_BUILTIN define"
+#endif
+
+#include "tupleobject.h"
+
+#define _PyTuple_ITEMS(op) (_PyTuple_CAST(op)->ob_item)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTERNAL_TUPLEOBJECT_H */